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
This commit is contained in:
Côme ALLART
2022-11-16 18:32:24 +01:00
parent 8e8b22f6ec
commit ed51a92116
5 changed files with 59 additions and 83 deletions

View File

@@ -0,0 +1,25 @@
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)
}