generated from saji/ecp5-template
start work on cxxrtl simulation backend
This commit is contained in:
parent
dd334e8bad
commit
300e8192fe
|
@ -31,22 +31,22 @@ ip = "dhcp" # Can also be e.g. "192.168.0.123"
|
||||||
strict = true # allows some wacky configurations, like panels that overlap.
|
strict = true # allows some wacky configurations, like panels that overlap.
|
||||||
|
|
||||||
[[display.strings]]
|
[[display.strings]]
|
||||||
position = { x = 64, y = 0 }
|
position = { x = 0, y = 0 }
|
||||||
dimensions = { length = 256, height = 64 }
|
dimensions = { length = 256, height = 64 }
|
||||||
rotation = "UPDOWN"
|
rotation = "R90"
|
||||||
[[display.strings]]
|
[[display.strings]]
|
||||||
position = { x = 65, y = 0 }
|
position = { x = 65, y = 0 }
|
||||||
dimensions = { length = 256, height = 64 }
|
dimensions = { length = 256, height = 64 }
|
||||||
rotation = "LEFTRIGHT"
|
rotation = "R0"
|
||||||
[[display.strings]]
|
[[display.strings]]
|
||||||
position = { x = 65, y = 65 }
|
position = { x = 65, y = 65 }
|
||||||
dimensions = { length = 256, height = 64 }
|
dimensions = { length = 256, height = 64 }
|
||||||
rotation = "LEFTRIGHT"
|
rotation = "R0"
|
||||||
[[display.strings]]
|
[[display.strings]]
|
||||||
position = { x = 65, y = 130 }
|
position = { x = 65, y = 130 }
|
||||||
dimensions = { length = 256, height = 64 }
|
dimensions = { length = 256, height = 64 }
|
||||||
rotation = "LEFTRIGHT"
|
rotation = "R0"
|
||||||
[[display.strings]]
|
[[display.strings]]
|
||||||
position = { x = 65, y = 195 }
|
position = { x = 65, y = 195 }
|
||||||
dimensions = { length = 256, height = 64 }
|
dimensions = { length = 256, height = 64 }
|
||||||
rotation = "LEFTRIGHT"
|
rotation = "R0"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
import logging
|
import logging
|
||||||
import argparse
|
import argparse
|
||||||
from groovylight.config import Config
|
from groovylight.config import Config
|
||||||
|
from groovylight.platforms.cxxrtl_sim import emit_cxxrtl
|
||||||
|
|
||||||
logger = logging.getLogger(__loader__.name)
|
logger = logging.getLogger(__loader__.name)
|
||||||
|
|
||||||
|
@ -54,7 +55,12 @@ def main():
|
||||||
setup_logger(args)
|
setup_logger(args)
|
||||||
|
|
||||||
conf = Config(args.config)
|
conf = Config(args.config)
|
||||||
print(conf)
|
|
||||||
|
# use the config to create the module.
|
||||||
|
|
||||||
|
if conf.conf["hardware"]["type"] == "cxxrtl":
|
||||||
|
logger.info("Generating CXXRTL based graphical simulator.")
|
||||||
|
emit_cxxrtl(conf)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,3 +7,14 @@
|
||||||
# black box the UDP streaming.
|
# black box the UDP streaming.
|
||||||
# provide code for display outputs to render onto SDL2 canvas.
|
# provide code for display outputs to render onto SDL2 canvas.
|
||||||
# compile code (optionally)
|
# compile code (optionally)
|
||||||
|
from amaranth.back import cxxrtl
|
||||||
|
from amaranth import Module
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def emit_cxxrtl(config):
|
||||||
|
m = Module()
|
||||||
|
|
||||||
|
cxxrtl.convert(m)
|
||||||
|
|
||||||
|
|
||||||
|
|
9
src/groovylight/top.py
Normal file
9
src/groovylight/top.py
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Creates a top-level module based on the display configuration.
|
||||||
|
|
||||||
|
|
||||||
|
from amaranth import Signal
|
||||||
|
from amaranth.lib import wiring, data
|
||||||
|
|
||||||
|
from .hub75
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue