@@ -13,6 +13,17 @@ DOCKER="docker run --user $(id -u):$(id -g) --rm -v $HOME:$HOME -w $PWD"
1313{% if 'syn' in steps %} # Synthesis
1414$DOCKER hdlc/ghdl:yosys /bin/bash -c "
1515{% if hooks %} {{ hooks.presyn | join('\n') }}{% endif %}
16+
17+ {% set gflags = '--std=08 -fsynopsys -fexplicit -frelaxed' %}
18+ {% if files %} # Files inclusion
19+ {% for name , attr in files .items () %}
20+ {% if attr .hdl == "vhdl" %}
21+ ghdl -a {{ gflags }}{% if 'lib' in attr %} --work={{ attr.lib }}{% endif %} {{ name }}
22+ {% endif %}
23+ {% endfor %}
24+ {% endif %}
25+ ghdl -a --std=08 -fsynopsys -fexplicit -frelaxed /home/rodrigo/repos-ram/PyFPGA/pyfpga/examples/sources/vhdl/top.vhdl
26+
1627yosys -Q -m ghdl -p '
1728
1829{% if includes %} # Verilog Includes
@@ -29,13 +40,21 @@ verilog_defines{% for key, value in defines.items() %} -D{{ key }}={{ value }}{%
2940read_verilog -defer {{ name }}
3041{% elif attr .hdl == "slog" %}
3142read_verilog -defer -sv {{ name }}
43+ {% elif attr .hdl == "vhdl" %}
44+ {% if loop .first %}
45+ # VHDL Generics
46+ {% set generics = "-gFREQ=125000000 -gSECS=1" %}
47+ ghdl {{ gflags }} {{ generics }} {{ top }}
48+ {% endif %}
3249{% endif %}
3350{% endfor %}
3451{% endif %}
3552
36- {% if params %} # Verilog Parameters / VHDL Generics
53+ {#
54+ {% if params %}# Verilog Parameters
3755chparam{% for key, value in params.items() %} -set {{ key }} {{ value }}{% endfor %}
3856{% endif %}
57+ #}
3958
4059# Top-level specification and Syntesis
4160{% if family in ['ice40' , 'ecp5' ] %}
0 commit comments