Giter Club home page Giter Club logo

Comments (6)

rwatson avatar rwatson commented on June 8, 2024

xo_emit_field() pointed out to me by @allanjude -- apparently it does exactly what I need for exactly this reason. Unfortunately, I failed to find it when spelunking. Can I suggest an Xref from the xo_emit(3) man page?

from libxo.

rwatson avatar rwatson commented on June 8, 2024

Apparently this is, in fact, because it doesn't have a man page. Reopening as a bug report. :-)

from libxo.

philshafer avatar philshafer commented on June 8, 2024

I should also comment that you should avoid underscores and upper case field names. Please review the guidelines at:

https://libxo.readthedocs.io/en/latest/faq.html#what-makes-a-good-field-name

I'm guessing these are real concrete register names, so perhaps these don't apply, or perhaps you should use a more flexible schema, like:

<register>
    <name>L1D_CACHE_ACCESS</name>
    <value>10</value>
<register>
<register>
    <name>L1D_CACHE_LIMIT</name>
    <value>1024</value>
</register>

This gives you some benefits:

  • allows the receiver to look for specific values (e.g. 'register[name=="L1D_CACHE_ACCESS"]/value')
  • allows the receiver to handle values generically ('for-each (register) { call foo(name, value); }')
  • allows names that are not xml-compatible (starting with a number)
  • allows names to vary while having a simple, fixed schema
  • lets you use the native hardware names that violate the field name guidelines

Thanks,
Phil

from libxo.

rwatson avatar rwatson commented on June 8, 2024

They are names defined by the architecture spec itself, so we can't change those. I agree that they are not very desirable (for all the reasons you suggest).

I did originally use the schedule you described, but it made things rather more messy to deal with in Python in our lab templates. This model removes a level of data-structure indirection, which does actually simplify things substantially.

from libxo.

philshafer avatar philshafer commented on June 8, 2024

Fix is in 'develop' branch:

https://raw.githubusercontent.com/Juniper/libxo/develop/libxo/xo_emit_field.3

Thanks,
Phil

from libxo.

philshafer avatar philshafer commented on June 8, 2024

Fixed in libxo-1.5.0

from libxo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.