Files
SpinalTemplateSbt/src/main/scala/mylib/MyTopLevelGen.scala
Côme ALLART ed51a92116 big update
- remove not supported anymore procedural syntax for main functions
- use App instead of main
- auto format
- move comments to have more user-friendly access to "run" and "debug"
  button for Apps
- move generators to dedicated new file
2022-11-16 18:32:24 +01:00

26 lines
709 B
Scala

package mylib
import spinal.core._
object MyTopLevelVerilog extends App {
// Generate the MyTopLevel's Verilog
SpinalVerilog(new MyTopLevel)
}
object MyTopLevelVhdl extends App {
// Generate the MyTopLevel's VHDL
SpinalVhdl(new MyTopLevel)
}
// 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)
)
object MyTopLevelVerilogWithCustomConfig extends App {
// Generate the MyTopLevel's Verilog using the above custom configuration.
MySpinalConfig.generateVerilog(new MyTopLevel)
}