clash-lang / clash-compiler

Haskell to VHDL/Verilog/SystemVerilog compiler
https://clash-lang.org/
Other
1.4k stars 147 forks source link

VIO and ILA: explicitly check setName #2662

Open DigitalBrains1 opened 4 months ago

DigitalBrains1 commented 4 months ago

If Clash.Magic.setName was used, use that name for the instance. Otherwise, use a fixed default name.

Fixes #2654

Still TODO:

martijnbastiaan commented 4 months ago

Interesting! Didn't know this was a thing. Should we add a netlist output regression test?

DigitalBrains1 commented 4 months ago

Should we add a netlist output regression test?

What exactly would it test; that it doesn't regress to issue #2654? So, in essence that the netlist output should not contain __VOID_TDECL_NOOP__ anywhere?

My tired brain won't come up with an analysis how useful this is, so I'm just going to go with your opinion. If you want it, I'll write it.

christiaanb commented 4 months ago

Should we add a netlist output regression test?

What exactly would it test; that it doesn't regress to issue #2654? So, in essence that the netlist output should not contain __VOID_TDECL_NOOP__ anywhere?

My tired brain won't come up with an analysis how useful this is, so I'm just going to go with your opinion. If you want it, I'll write it.

We already have HDL tests that check whether something is not in the generated HDL: https://github.com/clash-lang/clash-compiler/blob/22b3a581a87bf079203302e732008219531ad36b/tests/shouldwork/Vector/IterateCF.hs#L30

So I guess it could work like that?