rdaly525 / coreir

BSD 3-Clause "New" or "Revised" License
99 stars 24 forks source link

Test Roms in simulator #567

Open rdaly525 opened 6 years ago

rdaly525 commented 6 years ago

I changed the init parameter to roms to be a json argument. We should come up with multiple ways to interpret the rom parameter. I am thinking something like: {_type: "array", value: [[]]} or {_type: "file", value: "filename.bin"}

etc... This allows some flexibility in representing the initialization of ROMs.

rdaly525 commented 6 years ago

@dillonhuff , @leonardt What do you think? We should also try to make something somewhat consistent with Magma

leonardt commented 6 years ago

Your proposal seems reasonable. What are the various ways in which we could imagine initializing a ROM? Here are some I can think of:

Would the idea be that the arguments have to be native JSON types? If so, then we couldn't use BitVectors.

In theory, couldn't a bitvector be encoded as a JSON array of bools?

rdaly525 commented 6 years ago

The idea is that it can be serialized to JSON. Encoding bitvectors as strings (as we currently do) is fine. @dillonhuff, could you test a couple of these in your simulator? I think a target app would Pat's pico processor. It would be great if we could flush that app entirely through to the simulator

dillonhuff commented 6 years ago

@rdaly525 now is not a great time since I'm preparing a paper for August 3rd.

Are there examples of coreir that use this new json rom? Also could you send a link to Pat's pico processor? Does it already have behavioral tests that I could use?