StanfordAHA/lassen

Add comments on PE bitstream

Opened this issue · 4 comments

Kuree commented

Currently there is no way to know what ops the PE bitstream corresponds to. In other words it's impossible to debug the PE. Can someone add ways to comment the bitstream so that a human programmer can understand what's going one?

@rsetaluri, I think this is relevant to garnet integration. Can you add the string version of the instruction in the bitfile for debug? You should just be able to call str(instr)

I'm a bit unclear on what you want to do. The point of the interfaces is that you configure the PE with an instruction which is abstract/human understandable. How would you "comment" the bitstream? Can you provide a concrete example of what you're looking for?

Kuree commented

I'm not talking about instructions: I'm referring to bitstream, as in 0xFFFFFFFF 0xFFFFFFFF.
For now it produces something like

F3000309 00000000
F4000309 00000000
F5000309 00000000
FF000309 0000E00E

I need something like

F3000309 00000000
 # data[(0, 0)] : init `bit0` reg with const `0`
 
 F4000309 00000000
 # data[(0, 0)] : init `bit1` reg with const `0`
 
 F5000309 00000000
 # data[(0, 0)] : init `bit2` reg with const `0`
 
 FF000309 0000E00E
 # data[(5, 0)] : alu_op = lut ; 0xE
 # data[(6, 6)] : unsigned=0x0
 # data[(15, 12] : flag_sel: PE_FLAG_LUT=0xE
 # data[(25, 24)]: bit0: 'const_0' (REG_CONST)
 # data[(27, 26)]: bit1: 'const_1' (REG_CONST)
 # data[(29, 28)]: bit2: 'const_2' (REG_CONST)

Unless I can train myself to recognize which bit fields means what, I have to refer to these annotated bitstream to debug the design.

Got it. This seems like something that should be done at the higher level, when the bitstream is output to file. Can you point to where this is happening?