n-kremeris / verilator_basics

MIT License
49 stars 6 forks source link

Add a static cast to op_in_r assignment #2

Open teatkin opened 1 year ago

teatkin commented 1 year ago

In the case where rst is high when registering inputs, some later versions of verilator throw an error. By statically casting the initialisation value this explicitly converts the value and therefore does not cause a warning.

My apologies if this is poorly understood, I am very new to verilog and am working off what little I have gleaned from the verilator docs.

Verilator docs page: https://verilator.org/guide/latest/warnings.html#cmdoption-arg-ENUMVALUE Verilator version: Verilator 5.006 2023-01-22 rev (Debian 5.006-2)