mirror of
https://github.com/SpinalHDL/SpinalTemplateSbt.git
synced 2025-10-22 23:58:44 +08:00
Add example with custom config
This commit is contained in:
@@ -54,3 +54,14 @@ object MyTopLevelVhdl {
|
|||||||
SpinalVhdl(new MyTopLevel)
|
SpinalVhdl(new MyTopLevel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Define a custom SpinalHDL configuration with synchronous reset instead of the default asynchronous one. This configuration can be resued everywhere
|
||||||
|
object MySpinalConfig extends SpinalConfig(defaultConfigForClockDomains = ClockDomainConfig(resetKind = SYNC))
|
||||||
|
|
||||||
|
//Generate the MyTopLevel's Verilog using the above custom configuration.
|
||||||
|
object MyTopLevelVerilogWithCustomConfig {
|
||||||
|
def main(args: Array[String]) {
|
||||||
|
MySpinalConfig.generateVerilog(new MyTopLevel)
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user