soc_maker 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +5 -0
- data/History.txt +4 -0
- data/LICENSE +678 -0
- data/README.rdoc +228 -0
- data/Rakefile +46 -0
- data/bin/soc_maker_cli +80 -0
- data/bin/soc_maker_parser +85 -0
- data/core_lib/cores/adv_debug_sys/01_adv_debug_sys.yaml +245 -0
- data/core_lib/cores/or1200_rel2/01_or1200.yaml +208 -0
- data/core_lib/cores/or1200_rel2/02_or1200_files.yaml +421 -0
- data/core_lib/cores/or1200_rel2/03_or1200_sparam.yaml +188 -0
- data/core_lib/cores/or1200_rel2/or1200_defines.v.in +1799 -0
- data/core_lib/cores/ram_wb/ram_wb.yaml +102 -0
- data/core_lib/cores/ram_wb/ram_wb_b3.v.in +259 -0
- data/core_lib/cores/uart16550/01_uart16550.yaml +99 -0
- data/core_lib/cores/uart16550/02_uart16550_files.yaml +70 -0
- data/core_lib/cores/wb_connect/minsoc_tc_top.v +1802 -0
- data/core_lib/cores/wb_connect/wb_connect.yaml +733 -0
- data/core_lib/inc.yaml +13 -0
- data/core_lib/interfaces/clk_rst/clk.yaml +9 -0
- data/core_lib/interfaces/clk_rst/rst.yaml +9 -0
- data/core_lib/interfaces/clk_rst/single.yaml +7 -0
- data/core_lib/interfaces/debug/debug.yaml +32 -0
- data/core_lib/interfaces/jtag/jtag.yaml +13 -0
- data/core_lib/interfaces/jtag/jtag_tap.yaml +22 -0
- data/core_lib/interfaces/power/or_power.yaml +25 -0
- data/core_lib/interfaces/uart/uart.yaml +21 -0
- data/core_lib/interfaces/wishbone/wishbone_ma_b3.yaml +54 -0
- data/core_lib/interfaces/wishbone/wishbone_sl_b3.yaml +51 -0
- data/doc/class_arch.uml +5113 -0
- data/doc/fig/hierarchical.svg +273 -0
- data/examples/or1200_test/or1200_test.cmd +78 -0
- data/examples/or1200_test/or1200_test.rb +136 -0
- data/examples/or1200_test/rtl/or1200_test_top.vhd +274 -0
- data/examples/or1200_test/rtl/s3astarter.ucf +10 -0
- data/examples/or1200_test/rtl/xilinx_internal_jtag.v +438 -0
- data/examples/or1200_test/rtl/xilinx_internal_jtag_options.v +12 -0
- data/examples/or1200_test/sw/README.txt +35 -0
- data/examples/or1200_test/sw/bin2vmem.c +159 -0
- data/examples/or1200_test/sw/board.h +24 -0
- data/examples/or1200_test/sw/compile.sh +18 -0
- data/examples/or1200_test/sw/except.S +152 -0
- data/examples/or1200_test/sw/int.c +79 -0
- data/examples/or1200_test/sw/int.h +14 -0
- data/examples/or1200_test/sw/interconnect.h +17 -0
- data/examples/or1200_test/sw/interrupts.c +14 -0
- data/examples/or1200_test/sw/main.c +16 -0
- data/examples/or1200_test/sw/or1200.h +454 -0
- data/examples/or1200_test/sw/orp.ld +60 -0
- data/examples/or1200_test/sw/reset.S +112 -0
- data/examples/or1200_test/sw/support.c +123 -0
- data/examples/or1200_test/sw/support.h +33 -0
- data/examples/or1200_test/sw/tick.c +30 -0
- data/examples/or1200_test/sw/tick.h +2 -0
- data/examples/or1200_test/sw/uart.c +136 -0
- data/examples/or1200_test/sw/uart.h +126 -0
- data/lib/soc_maker.rb +324 -0
- data/lib/soc_maker/cli.rb +544 -0
- data/lib/soc_maker/conf.rb +310 -0
- data/lib/soc_maker/core_def.rb +579 -0
- data/lib/soc_maker/core_inst.rb +305 -0
- data/lib/soc_maker/err.rb +211 -0
- data/lib/soc_maker/hdl_coder.rb +500 -0
- data/lib/soc_maker/hdl_file.rb +166 -0
- data/lib/soc_maker/hdl_parser.rb +431 -0
- data/lib/soc_maker/ifc_def.rb +193 -0
- data/lib/soc_maker/ifc_port.rb +133 -0
- data/lib/soc_maker/ifc_spc.rb +180 -0
- data/lib/soc_maker/lib.rb +289 -0
- data/lib/soc_maker/lib_inc.rb +109 -0
- data/lib/soc_maker/parameter.rb +149 -0
- data/lib/soc_maker/soc_def.rb +847 -0
- data/lib/soc_maker/sparameter.rb +289 -0
- data/lib/soc_maker/version.rb +8 -0
- data/lib/soc_maker/ypp.rb +130 -0
- data/soc_maker.gemspec +28 -0
- data/spec/cli_cmds1.txt +39 -0
- data/spec/cli_spec.rb +49 -0
- data/spec/conf_spec.rb +44 -0
- data/spec/core_def_spec.rb +503 -0
- data/spec/core_inst_spec.rb +169 -0
- data/spec/hdl_file_spec.rb +154 -0
- data/spec/hdl_parser_spec.rb +201 -0
- data/spec/ifc_def_spec.rb +121 -0
- data/spec/ifc_port_spec.rb +92 -0
- data/spec/ifc_spc_spec.rb +196 -0
- data/spec/lib_inc_spec.rb +99 -0
- data/spec/lib_spec.rb +209 -0
- data/spec/parameter_spec.rb +86 -0
- data/spec/soc_def_spec.rb +611 -0
- data/spec/soc_maker_spec.rb +7 -0
- data/spec/sparameter_spec.rb +182 -0
- data/spec/spec_helper.rb +78 -0
- data/spec/test_soc.yaml +105 -0
- data/spec/test_soc2.yaml +60 -0
- data/spec/test_soc_lib/cores/core_A_rel1/00_core_a.yaml +75 -0
- data/spec/test_soc_lib/cores/core_A_rel1/01_core_a.yaml +57 -0
- data/spec/test_soc_lib/cores/core_A_rel1/core_a.vhd +29 -0
- data/spec/test_soc_lib/cores/core_A_rel1/core_a_pkg.vhd.src +3 -0
- data/spec/test_soc_lib/cores/core_A_rel1/core_a_pkg2.vhd.src +4 -0
- data/spec/test_soc_lib/cores/core_A_rel1/core_a_pkg3.v.src +6 -0
- data/spec/test_soc_lib/cores/core_B_rel1/core_b.vhd +25 -0
- data/spec/test_soc_lib/cores/core_B_rel1/core_b.yaml +36 -0
- data/spec/test_soc_lib/cores/core_C_v1/core_C.vhd +57 -0
- data/spec/test_soc_lib/cores/core_C_v1/core_c.yaml +42 -0
- data/spec/test_soc_lib/cores/soc_A/soc_A.yaml +12 -0
- data/spec/test_soc_lib/cores/soc_maker_include.yaml +6 -0
- data/spec/test_soc_lib/ifcs/core_AB_ifc/bidir_ifc.yaml +19 -0
- data/spec/test_soc_lib/ifcs/core_AB_ifc/core_AB_ifc.yaml +15 -0
- data/spec/test_soc_lib/ifcs/core_AB_ifc/top_ifc.yaml +9 -0
- data/spec/test_soc_lib/soc_maker_include.yaml +4 -0
- data/spec/yaml_examples.rb +367 -0
- data/spec/ypp_spec.rb +156 -0
- data/test/test_soc_maker.rb +0 -0
- metadata +255 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
static_parameters:
|
2
|
+
:core_a_pkg.vhd.src: SOCM_SPARAM
|
3
|
+
dir: .
|
4
|
+
path: ./core_a_pkg.vhd.src
|
5
|
+
file_dst: core_a_pkg.vhd
|
6
|
+
parameters:
|
7
|
+
:p1: SOCM_SENTRY
|
8
|
+
token: TOK1
|
9
|
+
type: integer
|
10
|
+
min: 0
|
11
|
+
max: 100
|
12
|
+
visible: true
|
13
|
+
editable: true
|
14
|
+
default: 22
|
15
|
+
description: Some setup
|
16
|
+
:p3: SOCM_SENTRY
|
17
|
+
token: TOK_XYZ
|
18
|
+
type: integer
|
19
|
+
min: 0
|
20
|
+
max: 100
|
21
|
+
visible: true
|
22
|
+
editable: true
|
23
|
+
default: 4
|
24
|
+
description: Some setup
|
25
|
+
:core_a_pkg2.vhd.src: SOCM_SPARAM
|
26
|
+
dir: .
|
27
|
+
path: ./core_a_pkg2.vhd.src
|
28
|
+
file_dst: core_a_pkg2.vhd
|
29
|
+
parameters:
|
30
|
+
:p2: SOCM_SENTRY
|
31
|
+
token: TOK2
|
32
|
+
type: integer
|
33
|
+
min: 0
|
34
|
+
max: 100
|
35
|
+
visible: true
|
36
|
+
editable: true
|
37
|
+
default: 5
|
38
|
+
description: More setup
|
39
|
+
|
40
|
+
:core_a_pkg3.v.src: SOCM_SPARAM
|
41
|
+
dir: .
|
42
|
+
path: ./core_a_pkg3.v.src
|
43
|
+
file_dst: core_a_pkg3.v
|
44
|
+
parameters:
|
45
|
+
:pv1: SOCM_SENTRY
|
46
|
+
token: TOK_V1
|
47
|
+
type: enum
|
48
|
+
min: 0
|
49
|
+
max: 100
|
50
|
+
visible: true
|
51
|
+
editable: true
|
52
|
+
default: 5
|
53
|
+
description: More setup
|
54
|
+
choice:
|
55
|
+
- "`define SEL_1"
|
56
|
+
- "`define SEL_2"
|
57
|
+
- "`define SEL_3"
|
@@ -0,0 +1,29 @@
|
|
1
|
+
library ieee;
|
2
|
+
use ieee.std_logic_1164.ALL;
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
entity core_a is
|
8
|
+
generic(
|
9
|
+
param1 : natural := 8;
|
10
|
+
param2 : natural := 4;
|
11
|
+
param3 : natural := 5
|
12
|
+
);
|
13
|
+
port(
|
14
|
+
sig_con1a : in std_logic_vector( param1-1 downto 0 );
|
15
|
+
sig_con1b : in std_logic_vector( param2-1 downto 0 );
|
16
|
+
sig_con1c : out std_logic
|
17
|
+
);
|
18
|
+
end entity core_a;
|
19
|
+
|
20
|
+
architecture IMPL of core_a is
|
21
|
+
|
22
|
+
|
23
|
+
begin
|
24
|
+
|
25
|
+
sig_con1c <= '1';
|
26
|
+
|
27
|
+
end architecture IMPL;
|
28
|
+
|
29
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
library ieee;
|
2
|
+
use ieee.std_logic_1164.ALL;
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
entity core_b is
|
7
|
+
port(
|
8
|
+
mysig_con1a : out std_logic_vector( 7 downto 0 );
|
9
|
+
mysig_con1b : out std_logic_vector( 31 downto 0 );
|
10
|
+
mysig_con1c : in std_logic
|
11
|
+
);
|
12
|
+
end entity core_b;
|
13
|
+
|
14
|
+
architecture IMPL of core_b is
|
15
|
+
|
16
|
+
|
17
|
+
begin
|
18
|
+
|
19
|
+
|
20
|
+
mysig_con1a <= "11001010";
|
21
|
+
mysig_con1b <= ( others => '1' );
|
22
|
+
|
23
|
+
end architecture IMPL;
|
24
|
+
|
25
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
SOCM_CORE
|
2
|
+
name: Core B
|
3
|
+
description: B test IP-core
|
4
|
+
id: core_B,rel1
|
5
|
+
date: 1.1.2014
|
6
|
+
license: LGPL
|
7
|
+
licensefile:
|
8
|
+
author: Christian Hättich
|
9
|
+
authormail: feddischson@gmx.com
|
10
|
+
repocmd:
|
11
|
+
toplevel: core_b
|
12
|
+
interfaces:
|
13
|
+
:myifc: SOCM_IFC
|
14
|
+
name: core_AB_ifc
|
15
|
+
dir: 1
|
16
|
+
id: core_AB_ifc,1
|
17
|
+
ports:
|
18
|
+
:mysig_con1a: SOCM_PORT
|
19
|
+
spc_ref: sig_a
|
20
|
+
len: 8
|
21
|
+
:mysig_con1b: SOCM_PORT
|
22
|
+
spc_ref: sig_b
|
23
|
+
len: 16
|
24
|
+
:mysig_con1c: SOCM_PORT
|
25
|
+
spc_ref: sig_c
|
26
|
+
len: 1
|
27
|
+
|
28
|
+
hdlfiles:
|
29
|
+
:core_b.vhd: SOCM_HDL_FILE
|
30
|
+
use_syn: true
|
31
|
+
use_sys_sim: true
|
32
|
+
use_mod_sim: true
|
33
|
+
type: vhdl
|
34
|
+
path: ./core_b.vhd
|
35
|
+
|
36
|
+
|
@@ -0,0 +1,57 @@
|
|
1
|
+
library ieee;
|
2
|
+
library std;
|
3
|
+
use ieee.std_logic_1164.ALL;
|
4
|
+
use ieee.numeric_std.ALL;
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
entity core_c is
|
9
|
+
port(
|
10
|
+
clk_i : in std_logic;
|
11
|
+
rst_i : in std_logic;
|
12
|
+
en_i : in std_logic;
|
13
|
+
wr_i : in std_logic;
|
14
|
+
bidir_io : inout std_logic_vector( 7 downto 0 )
|
15
|
+
);
|
16
|
+
end entity;
|
17
|
+
|
18
|
+
|
19
|
+
architecture IMP of core_c is
|
20
|
+
|
21
|
+
|
22
|
+
signal cnt : unsigned( 7 downto 0 );
|
23
|
+
|
24
|
+
begin
|
25
|
+
|
26
|
+
p : process( clk, rst )
|
27
|
+
begin
|
28
|
+
if clk'event and clk='1' then
|
29
|
+
|
30
|
+
if rst = '1' then
|
31
|
+
cnt <= ( others => '0' );
|
32
|
+
bidir <= ( others => 'Z' );
|
33
|
+
else
|
34
|
+
|
35
|
+
-- default case: we increase the counter
|
36
|
+
cnt <= cnt+1;
|
37
|
+
|
38
|
+
if en = '0' then
|
39
|
+
|
40
|
+
if wr = '1' then
|
41
|
+
cnt <= unsigned( bidir );
|
42
|
+
end if;
|
43
|
+
bidir <= ( others => 'Z' );
|
44
|
+
else
|
45
|
+
bidir <= std_logic_vector( cnt );
|
46
|
+
end if;
|
47
|
+
|
48
|
+
|
49
|
+
end if;
|
50
|
+
|
51
|
+
end if;
|
52
|
+
end process;
|
53
|
+
end architecture IMP;
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
SOCM_CORE
|
2
|
+
name: Core C
|
3
|
+
description: C test IP-core
|
4
|
+
id: core_C,v1
|
5
|
+
date: 1.1.2014
|
6
|
+
license: LGPL
|
7
|
+
licensefile:
|
8
|
+
author: Christian Hättich
|
9
|
+
authormail: feddischson@gmx.com
|
10
|
+
repocmd:
|
11
|
+
toplevel: core_c
|
12
|
+
interfaces:
|
13
|
+
:ifc01: SOCM_IFC
|
14
|
+
name: bidir_interface
|
15
|
+
dir: 0
|
16
|
+
id: bidir_ifc,1
|
17
|
+
ports:
|
18
|
+
:clk_i: SOCM_PORT
|
19
|
+
spc_ref: clk
|
20
|
+
len: 1
|
21
|
+
:rst: SOCM_PORT
|
22
|
+
spc_ref: rst
|
23
|
+
len: 1
|
24
|
+
:en: SOCM_PORT
|
25
|
+
spc_ref: en
|
26
|
+
len: 1
|
27
|
+
:wr: SOCM_PORT
|
28
|
+
spc_ref: wr
|
29
|
+
len: 1
|
30
|
+
:bidir: SOCM_PORT
|
31
|
+
spc_ref: bidir
|
32
|
+
len: 8
|
33
|
+
|
34
|
+
hdlfiles:
|
35
|
+
:core_c.vhd: SOCM_HDL_FILE
|
36
|
+
use_syn: true
|
37
|
+
use_sys_sim: true
|
38
|
+
use_mod_sim: true
|
39
|
+
type: vhdl
|
40
|
+
path: ./core_C.vhd
|
41
|
+
|
42
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
SOCM_IFC_SPC
|
2
|
+
name: Bidirectional interface
|
3
|
+
id: bidir_ifc,1
|
4
|
+
ports:
|
5
|
+
:clk:
|
6
|
+
:dir: 1
|
7
|
+
:mandatoru: true
|
8
|
+
:rst:
|
9
|
+
:dir: 1
|
10
|
+
:mandatory: true
|
11
|
+
:en:
|
12
|
+
:dir: 1
|
13
|
+
:mandatory: true
|
14
|
+
:wr:
|
15
|
+
:dir: 1
|
16
|
+
:mandatory: true
|
17
|
+
:bidir:
|
18
|
+
:dir: 2
|
19
|
+
:mandatory: true
|
@@ -0,0 +1,367 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
RSpec.shared_context "yaml examples", :a => :b do
|
5
|
+
|
6
|
+
before do
|
7
|
+
|
8
|
+
@valid_yamls = []
|
9
|
+
|
10
|
+
|
11
|
+
#
|
12
|
+
# A yaml example, which contains
|
13
|
+
# - a full definition
|
14
|
+
# - an interface with one port
|
15
|
+
# - one hdl file
|
16
|
+
# - one instance parameter
|
17
|
+
# - one static parameter
|
18
|
+
#
|
19
|
+
@FULL_YAML = '''SOCM_CORE
|
20
|
+
name: core_A
|
21
|
+
description: A test IP-core
|
22
|
+
id: core_A,rel1
|
23
|
+
date: 1.1.2014
|
24
|
+
license: LGPL
|
25
|
+
licensefile:
|
26
|
+
author: Christian Haettich
|
27
|
+
authormail: feddischson@opencores.org
|
28
|
+
vccmd: svn co http://some-address/
|
29
|
+
toplevel: core_a
|
30
|
+
interfaces:
|
31
|
+
:ifc01: SOCM_IFC
|
32
|
+
name: core_AB_ifc
|
33
|
+
dir: 0
|
34
|
+
id: core_AB_ifc,1
|
35
|
+
ports:
|
36
|
+
:sig_con1a: SOCM_PORT
|
37
|
+
spc_ref: sig_a
|
38
|
+
len: param1
|
39
|
+
hdlfiles:
|
40
|
+
:core_a.vhd: SOCM_HDL_FILE
|
41
|
+
use_syn: true
|
42
|
+
use_sys_sim: true
|
43
|
+
use_mod_sim: true
|
44
|
+
type: vhdl
|
45
|
+
path: ./core_a.vhd
|
46
|
+
inst_parameters:
|
47
|
+
:param1: SOCM_PARAM
|
48
|
+
type: integer
|
49
|
+
default: 8
|
50
|
+
min: 0
|
51
|
+
max: 10
|
52
|
+
visible: true
|
53
|
+
editable: true
|
54
|
+
description: More setup
|
55
|
+
static_parameters:
|
56
|
+
:core_a_pkg.vhd.src: SOCM_SPARAM
|
57
|
+
path: ./core_a.pkg.src
|
58
|
+
file_dst: core_a_pkg.vhd
|
59
|
+
parameters:
|
60
|
+
:p1: SOCM_SENTRY
|
61
|
+
token: TOK1
|
62
|
+
type: integer
|
63
|
+
min: 0
|
64
|
+
max: 100
|
65
|
+
visible: true
|
66
|
+
editable: true
|
67
|
+
default: 3
|
68
|
+
description: Some setup
|
69
|
+
'''
|
70
|
+
@valid_yamls << { desc: 'should return a class of type CoreDef when loading a full core-def',
|
71
|
+
yaml: @FULL_YAML }
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
# minimalistic def with one vhdl file
|
76
|
+
@MIN_YAML1 = '''SOCM_CORE
|
77
|
+
name: core_A
|
78
|
+
id: core_A,rel1
|
79
|
+
toplevel: top_A
|
80
|
+
hdlfiles:
|
81
|
+
:core_a.vhd: SOCM_HDL_FILE
|
82
|
+
path: ./core_a.vhd
|
83
|
+
'''
|
84
|
+
@valid_yamls << { desc: 'should return a class of type CoreDef when loading a minimal core-def',
|
85
|
+
yaml: @MIN_YAML1 }
|
86
|
+
|
87
|
+
|
88
|
+
# minimalistic def with one
|
89
|
+
# vhdl and one verilog file
|
90
|
+
@MIN_YAML2 = '''SOCM_CORE
|
91
|
+
name: core_A
|
92
|
+
id: core_A,rel1
|
93
|
+
toplevel: top_A
|
94
|
+
hdlfiles:
|
95
|
+
:core_a.vhd: SOCM_HDL_FILE
|
96
|
+
path: ./core_a.vhd
|
97
|
+
:core_b.v: SOCM_HDL_FILE
|
98
|
+
path: ./core_b.v
|
99
|
+
'''
|
100
|
+
@valid_yamls << { desc: 'should return a class of type CoreDef when loading a core-def with two files',
|
101
|
+
yaml: @MIN_YAML2 }
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
# minimal setup with one interface
|
106
|
+
@MIN_YAML_IFC = '''SOCM_CORE
|
107
|
+
name: core_A
|
108
|
+
id: core_A,rel1
|
109
|
+
toplevel: top_A
|
110
|
+
hdlfiles:
|
111
|
+
:core_a.vhd: SOCM_HDL_FILE
|
112
|
+
path: ./core_a.vhd
|
113
|
+
interfaces:
|
114
|
+
:ifc01: SOCM_IFC
|
115
|
+
name: a_ifc_def
|
116
|
+
dir: 0
|
117
|
+
id: a_ifc_def,1
|
118
|
+
ports:
|
119
|
+
:sig_con1a: SOCM_PORT
|
120
|
+
spc_ref: sig_a
|
121
|
+
'''
|
122
|
+
@valid_yamls << { desc: 'should return a class of type CoreDef when loading a minimal core-def with a minimal interface',
|
123
|
+
yaml: @MIN_YAML_IFC }
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
# minimal setup with one instance parameter
|
130
|
+
@MIN_YAML_INSTP = '''SOCM_CORE
|
131
|
+
name: core_A
|
132
|
+
id: core_A,rel1
|
133
|
+
toplevel: top_A
|
134
|
+
hdlfiles:
|
135
|
+
:core_a.vhd: SOCM_HDL_FILE
|
136
|
+
path: ./core_a.vhd
|
137
|
+
inst_parameters:
|
138
|
+
:param1: SOCM_PARAM
|
139
|
+
type: integer
|
140
|
+
'''
|
141
|
+
@valid_yamls << { desc: 'should return a class of type CoreDef when loading a minimal core-def (with instance param.)',
|
142
|
+
yaml: @MIN_YAML_INSTP }
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
# minimal def with one static parameter
|
147
|
+
@MIN_YAML_STATIC = '''SOCM_CORE
|
148
|
+
name: core_A
|
149
|
+
id: core_A,rel1
|
150
|
+
toplevel: top_A
|
151
|
+
hdlfiles:
|
152
|
+
:core_a.vhd: SOCM_HDL_FILE
|
153
|
+
path: ./core_a.vhd
|
154
|
+
static_parameters:
|
155
|
+
:a_file.vhd.src: SOCM_SPARAM
|
156
|
+
file_dst: a_file.vhd
|
157
|
+
path: ./core_a.vhd
|
158
|
+
parameters:
|
159
|
+
:p1: SOCM_SENTRY
|
160
|
+
type: integer
|
161
|
+
token: T1
|
162
|
+
'''
|
163
|
+
@valid_yamls << { desc: 'should return a class of type CoreDef when loading a minimal core-def (with static param.)',
|
164
|
+
yaml: @MIN_YAML_STATIC }
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
#
|
171
|
+
# A yaml example, which contains
|
172
|
+
# - a full definition
|
173
|
+
# - an interface with one port
|
174
|
+
# - one hdl file
|
175
|
+
# - one instance parameter
|
176
|
+
# - one static parameter
|
177
|
+
#
|
178
|
+
@FULL_SOC_YAML = '''SOCM_SOC
|
179
|
+
name: my_soc
|
180
|
+
description: A test SOC
|
181
|
+
id: my_soc,rel2
|
182
|
+
date: 1.1.2014
|
183
|
+
license: LGPL
|
184
|
+
licensefile:
|
185
|
+
toplevel: soc_top
|
186
|
+
author: Christian Haettich
|
187
|
+
authormail: feddischson@opencores.org
|
188
|
+
repocmd: svn co http://some-address/
|
189
|
+
'''
|
190
|
+
|
191
|
+
|
192
|
+
@SOC_YAML_WITH_CORE = '''SOCM_SOC
|
193
|
+
name: my_soc
|
194
|
+
description: A test SOC
|
195
|
+
id: my_soc,rel2
|
196
|
+
date: 1.1.2014
|
197
|
+
license: LGPL
|
198
|
+
licensefile:
|
199
|
+
author: Christian Haettich
|
200
|
+
authormail: feddischson@opencores.org
|
201
|
+
repocmd: svn co http://some-address/
|
202
|
+
toplevel: soc_top
|
203
|
+
cores:
|
204
|
+
:inst1: SOCM_INST
|
205
|
+
type: mycorerel1
|
206
|
+
'''
|
207
|
+
|
208
|
+
|
209
|
+
@F_YAML_STATIC_NO_TOKEN = '''SOCM_CORE
|
210
|
+
name: core_A
|
211
|
+
version: rel1
|
212
|
+
toplevel: top_A
|
213
|
+
hdlfiles:
|
214
|
+
:core_a.vhd: SOCM_HDL_FILE
|
215
|
+
path: ./core_a.vhd
|
216
|
+
static_parameters:
|
217
|
+
:a_file.vhd.src: SOCM_SPARAM
|
218
|
+
path: ./core_a.vhd
|
219
|
+
file_dst: a_file.vhd
|
220
|
+
parameters:
|
221
|
+
:p1: SOCM_SENTRY
|
222
|
+
min: 4
|
223
|
+
type: integer
|
224
|
+
'''
|
225
|
+
|
226
|
+
@F_YAML_STATIC_NO_PATH = '''SOCM_CORE
|
227
|
+
name: core_A
|
228
|
+
version: rel1
|
229
|
+
toplevel: top_A
|
230
|
+
hdlfiles:
|
231
|
+
:core_a.vhd: SOCM_HDL_FILE
|
232
|
+
path: ./core_a.vhd
|
233
|
+
static_parameters:
|
234
|
+
:a_file.vhd.src: SOCM_SPARAM
|
235
|
+
file_dst: a_file.vhd
|
236
|
+
parameters:
|
237
|
+
:p1: SOCM_SENTRY
|
238
|
+
min: 4
|
239
|
+
token: ABC
|
240
|
+
type: integer
|
241
|
+
'''
|
242
|
+
|
243
|
+
@F_YAML_STATIC_NO_TYPE = '''SOCM_CORE
|
244
|
+
name: core_A
|
245
|
+
version: rel1
|
246
|
+
toplevel: top_A
|
247
|
+
hdlfiles:
|
248
|
+
:core_a.vhd: SOCM_HDL_FILE
|
249
|
+
path: ./core_a.vhd
|
250
|
+
static_parameters:
|
251
|
+
:a_file.vhd.src: SOCM_SPARAM
|
252
|
+
file_dst: a_file.vhd
|
253
|
+
path: ./core_a.vhd
|
254
|
+
parameters:
|
255
|
+
:p1: SOCM_SENTRY
|
256
|
+
min: 4
|
257
|
+
token: ABC
|
258
|
+
'''
|
259
|
+
|
260
|
+
# missing file_dst in static parameter
|
261
|
+
@F_YAML_STATIC_NO_DST1 = '''SOCM_CORE
|
262
|
+
name: core_A
|
263
|
+
version: rel1
|
264
|
+
toplevel: top_A
|
265
|
+
hdlfiles:
|
266
|
+
:core_a.vhd: SOCM_HDL_FILE
|
267
|
+
path: ./core_a.vhd
|
268
|
+
static_parameters:
|
269
|
+
:a_file.vhd: SOCM_SPARAM
|
270
|
+
parameters:
|
271
|
+
:p1: SOCM_SENTRY
|
272
|
+
type: integer
|
273
|
+
token: T1
|
274
|
+
'''
|
275
|
+
# no parameter entry
|
276
|
+
@F_YAML_STATIC_NO_SENTRY = '''SOCM_CORE
|
277
|
+
name: core_A
|
278
|
+
version: rel1
|
279
|
+
toplevel: top_A
|
280
|
+
hdlfiles:
|
281
|
+
:core_a.vhd: SOCM_HDL_FILE
|
282
|
+
path: ./core_a.vhd
|
283
|
+
static_parameters:
|
284
|
+
:a_file.vhd.src: SOCM_SPARAM
|
285
|
+
file_dst: a_file_xyz.vhd
|
286
|
+
path: ./core_a.vhd
|
287
|
+
parameters:
|
288
|
+
:p1: SOCM_SENTRY
|
289
|
+
'''
|
290
|
+
|
291
|
+
# type is missing for param1
|
292
|
+
@F_YAML_INSTP_TYPE = '''SOCM_CORE
|
293
|
+
name: core_A
|
294
|
+
version: rel1
|
295
|
+
toplevel: top_A
|
296
|
+
hdlfiles:
|
297
|
+
:core_a.vhd: SOCM_HDL_FILE
|
298
|
+
path: ./core_a.vhd
|
299
|
+
inst_parameters:
|
300
|
+
:param1: SOCM_PARAM
|
301
|
+
:min: 0
|
302
|
+
'''
|
303
|
+
|
304
|
+
|
305
|
+
@IFC_YAML_VALID = """
|
306
|
+
SOCM_IFC_SPC
|
307
|
+
name: core_ifc
|
308
|
+
id: 'core_ifc,1'
|
309
|
+
ports:
|
310
|
+
:sig_a:
|
311
|
+
:dir: 1
|
312
|
+
:sig_b:
|
313
|
+
:dir: 1
|
314
|
+
:sig_c:
|
315
|
+
:dir: 0
|
316
|
+
"""
|
317
|
+
|
318
|
+
@IFC_YAML_INVALID = """
|
319
|
+
SOCM_IFC_SPC
|
320
|
+
name: core_ifc
|
321
|
+
id: 'core_ifc,1'
|
322
|
+
ports:
|
323
|
+
:sig_a:
|
324
|
+
:dir: '12'
|
325
|
+
:sig_b:
|
326
|
+
:dir: 1
|
327
|
+
:sig_c:
|
328
|
+
:dir: 0
|
329
|
+
"""
|
330
|
+
|
331
|
+
@IFC_YAML_INVALID2 = """
|
332
|
+
SOCM_IFC_SPC
|
333
|
+
name: core_ifc
|
334
|
+
id: 'core_ifc,1'
|
335
|
+
ports:
|
336
|
+
:sig_a:
|
337
|
+
:dir:
|
338
|
+
:sig_b:
|
339
|
+
:dir: 1
|
340
|
+
:sig_c:
|
341
|
+
:dir: 0
|
342
|
+
"""
|
343
|
+
|
344
|
+
#
|
345
|
+
# core definition with no info about the HDL file
|
346
|
+
@F_MIN_YAML_FIlE_NIL = '''SOCM_CORE
|
347
|
+
name: core_A
|
348
|
+
version: rel1
|
349
|
+
toplevel: top_A
|
350
|
+
hdlfiles:
|
351
|
+
:a_file.v: SOCM_HDL_FILE
|
352
|
+
'''
|
353
|
+
|
354
|
+
@F_YAML_FILE_TYPE = '''SOCM_CORE
|
355
|
+
name: core_A
|
356
|
+
version: rel1
|
357
|
+
toplevel: top_A
|
358
|
+
hdlfiles:
|
359
|
+
:core_a.vhd: SOCM_HDL_FILE
|
360
|
+
path: ./core_a.vhd
|
361
|
+
type: xhdl
|
362
|
+
'''
|
363
|
+
|
364
|
+
|
365
|
+
end
|
366
|
+
|
367
|
+
end
|