Minres / CoreDSL

Xtext project to parse CoreDSL files
Apache License 2.0
16 stars 3 forks source link

[Proposal] Rename args_disass to assembly #21

Closed AtomCrafty closed 2 years ago

AtomCrafty commented 2 years ago

Depends on #20

This is just a proposal, feel free to ignore it if you prefer the current style. I believe the args_disass keyword is very ugly, and assembly happens to have just the right length to make all three keywords in an instruction definition line up perfectly:

PRELU {
    encoding: 0b0000000 :: rs2[4:0] :: rs1[4:0] :: 0b000 :: rd[4:0] :: 0b1111011;  
    assembly: "{name(rd)}, {name(rs1)}, {name(rs2)}";
    behavior: { ... }
}
eyck commented 2 years ago

I'm not sure about this one since the value of args_disass/assembly are just the arguments of an (dis-)assemly instruction. Renaming it would imply a different meaning...

jopperm commented 2 years ago

I think assembly makes sense, even though you currently only use it as a format string for a disassembler.

encoding specifies the binary representation, and assembly the textual one. I'd expect that the compiler people need something like this once when they start looking into generating ISAX support from CoreDSL.

eyck commented 2 years ago

Those changes also need to be reflected in the wiki

jopperm commented 2 years ago

Those changes also need to be reflected in the wiki

Yup, I'll take care of that.