sdnellen / open-register-design-tool

Tool to generate register RTL, models, and docs using SystemRDL or JSpec input
Apache License 2.0
15 stars 3 forks source link

Ordt errors on fields using keywords #12

Closed sjalloq closed 5 years ago

sjalloq commented 5 years ago

Hi,

congratulations on the new role first and thanks for continued development of Ordt.

I'm not sure if this is a bug or you just don't accept the use of keywords in the RDL but I'm seeing the following issue. I've been using the systemrdl-compiler and this seems happy with the naming.

I've noticed that both a field called 'enable' and one called 'threshold' cause Ordt to bomb out with the following error:

line 3:34 extraneous input 'enable' expecting ';'
*** ERROR ***: RDL parser errors detected.

An example follows:

regfile my_reg {
        reg {
            field { reset=1'd0; } enable ;
        } my_cfg ;
} ;

addrmap addresss_map {
        my_reg _reg @0x0;
};
sdnellen commented 5 years ago

Just prefix the keyword with backslash, eg:

        field { reset=1'd0; } \enable ;
sjalloq commented 5 years ago

Ok, nice. Thanks.