Open rdaly525 opened 6 years ago
@dillonhuff , @leonardt What do you think? We should also try to make something somewhat consistent with Magma
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?
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
@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?
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.