DFiantHDL / DFHDL

DFiant HDL (DFHDL): A Dataflow Hardware Descripition Language
https://dfianthdl.github.io/
GNU Lesser General Public License v3.0
78 stars 8 forks source link

Breaking changes: Introduce `@top`, move clock/reset configurations, other updates #156

Closed soronpo closed 4 months ago

soronpo commented 4 months ago

This PR breaks backward source compatibility

Add options.ElaborationOptions and move clock/reset configuration there

Migration: change option.CompilerOptions.ClkCfg to option.ElaborationOptions.ClkCfg. Same for RstCfg.

@top annotation

This annotation is now must be applied on top-level design declarations. E.g.: @top class Example extends RTDesign Its purpose:

Migration: for top-level designs add @top(false) annotation if you don't want a main entry point.

Support for vector lengths as embedded parameters

Same as already existed for UInt,SInt,Bits widths, now exists for a generic vector length. E.g.:

val depth: Int <> CONST = 10
val dataWidth: Int <> CONST = 16
val vec = Bits(dataWidth) X depth <> VAR

Other minor updates: