Add example with custom config

This commit is contained in:
Dolu1990
2018-09-16 13:52:46 +02:00
parent e915e698a8
commit 86071d797a

View File

@@ -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)
}
}