bespoke-silicon-group / basejump_stl

BaseJump STL: A Standard Template Library for SystemVerilog
http://bjump.org/
Other
525 stars 99 forks source link

standardizing harden_p for bsg_mem #601

Open dpetrisko opened 2 years ago

dpetrisko commented 2 years ago

Standardizing the harden_p scheme for memories.

This means 1) removing harden_p from _synth memories 2) Adding harden_p to all other mems 3) In hardened directories default harden_p = 1 4) In non-hardened directories default harden_p = 0

dpetrisko commented 2 years ago

Doubtful that this will break anything as synth memories should never be explicitly instantiated anywhere, and not-synth mems will not be setting this unused parameter

taylor-bsg commented 2 years ago

Great suggested change. Do we have an error or warning that fires when if harden_p=1 and it is going to a non-hardened module?

taylor-bsg commented 2 years ago

If it is non-leaf, then it should pass harden_p along, rather than swallowing it. This way we don't have to clone the code for intermediate modules that would not be hardened, but whose children are hardened.

dpetrisko commented 2 years ago

Do we have an error or warning that fires when if harden_p=1 and it is going to a non-hardened module?

Can add!

If it is non-leaf, then it should pass harden_p along, rather than swallowing it. This way we don't have to clone the code for intermediate modules that would not be hardened, but whose children are hardened.

Not sure what you mean here. Are you proposing

Aside $warn vs $error?

dpetrisko commented 2 years ago

@taylor-bsg clarification on the above?