@@ -13,6 +13,17 @@ DOCKER="docker run --user $(id -u):$(id -g) --rm -v $HOME:$HOME -w $PWD"
13
13
{% if 'syn' in steps %} # Synthesis
14
14
$DOCKER hdlc/ghdl:yosys /bin/bash -c "
15
15
{% 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
+
16
27
yosys -Q -m ghdl -p '
17
28
18
29
{% if includes %} # Verilog Includes
@@ -29,13 +40,21 @@ verilog_defines{% for key, value in defines.items() %} -D{{ key }}={{ value }}{%
29
40
read_verilog -defer {{ name }}
30
41
{% elif attr .hdl == "slog" %}
31
42
read_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 %}
32
49
{% endif %}
33
50
{% endfor %}
34
51
{% endif %}
35
52
36
- {% if params %} # Verilog Parameters / VHDL Generics
53
+ {#
54
+ {% if params %}# Verilog Parameters
37
55
chparam{% for key, value in params.items() %} -set {{ key }} {{ value }}{% endfor %}
38
56
{% endif %}
57
+ #}
39
58
40
59
# Top-level specification and Syntesis
41
60
{% if family in ['ice40' , 'ecp5' ] %}
0 commit comments