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.
Files changed (116) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +5 -0
  3. data/History.txt +4 -0
  4. data/LICENSE +678 -0
  5. data/README.rdoc +228 -0
  6. data/Rakefile +46 -0
  7. data/bin/soc_maker_cli +80 -0
  8. data/bin/soc_maker_parser +85 -0
  9. data/core_lib/cores/adv_debug_sys/01_adv_debug_sys.yaml +245 -0
  10. data/core_lib/cores/or1200_rel2/01_or1200.yaml +208 -0
  11. data/core_lib/cores/or1200_rel2/02_or1200_files.yaml +421 -0
  12. data/core_lib/cores/or1200_rel2/03_or1200_sparam.yaml +188 -0
  13. data/core_lib/cores/or1200_rel2/or1200_defines.v.in +1799 -0
  14. data/core_lib/cores/ram_wb/ram_wb.yaml +102 -0
  15. data/core_lib/cores/ram_wb/ram_wb_b3.v.in +259 -0
  16. data/core_lib/cores/uart16550/01_uart16550.yaml +99 -0
  17. data/core_lib/cores/uart16550/02_uart16550_files.yaml +70 -0
  18. data/core_lib/cores/wb_connect/minsoc_tc_top.v +1802 -0
  19. data/core_lib/cores/wb_connect/wb_connect.yaml +733 -0
  20. data/core_lib/inc.yaml +13 -0
  21. data/core_lib/interfaces/clk_rst/clk.yaml +9 -0
  22. data/core_lib/interfaces/clk_rst/rst.yaml +9 -0
  23. data/core_lib/interfaces/clk_rst/single.yaml +7 -0
  24. data/core_lib/interfaces/debug/debug.yaml +32 -0
  25. data/core_lib/interfaces/jtag/jtag.yaml +13 -0
  26. data/core_lib/interfaces/jtag/jtag_tap.yaml +22 -0
  27. data/core_lib/interfaces/power/or_power.yaml +25 -0
  28. data/core_lib/interfaces/uart/uart.yaml +21 -0
  29. data/core_lib/interfaces/wishbone/wishbone_ma_b3.yaml +54 -0
  30. data/core_lib/interfaces/wishbone/wishbone_sl_b3.yaml +51 -0
  31. data/doc/class_arch.uml +5113 -0
  32. data/doc/fig/hierarchical.svg +273 -0
  33. data/examples/or1200_test/or1200_test.cmd +78 -0
  34. data/examples/or1200_test/or1200_test.rb +136 -0
  35. data/examples/or1200_test/rtl/or1200_test_top.vhd +274 -0
  36. data/examples/or1200_test/rtl/s3astarter.ucf +10 -0
  37. data/examples/or1200_test/rtl/xilinx_internal_jtag.v +438 -0
  38. data/examples/or1200_test/rtl/xilinx_internal_jtag_options.v +12 -0
  39. data/examples/or1200_test/sw/README.txt +35 -0
  40. data/examples/or1200_test/sw/bin2vmem.c +159 -0
  41. data/examples/or1200_test/sw/board.h +24 -0
  42. data/examples/or1200_test/sw/compile.sh +18 -0
  43. data/examples/or1200_test/sw/except.S +152 -0
  44. data/examples/or1200_test/sw/int.c +79 -0
  45. data/examples/or1200_test/sw/int.h +14 -0
  46. data/examples/or1200_test/sw/interconnect.h +17 -0
  47. data/examples/or1200_test/sw/interrupts.c +14 -0
  48. data/examples/or1200_test/sw/main.c +16 -0
  49. data/examples/or1200_test/sw/or1200.h +454 -0
  50. data/examples/or1200_test/sw/orp.ld +60 -0
  51. data/examples/or1200_test/sw/reset.S +112 -0
  52. data/examples/or1200_test/sw/support.c +123 -0
  53. data/examples/or1200_test/sw/support.h +33 -0
  54. data/examples/or1200_test/sw/tick.c +30 -0
  55. data/examples/or1200_test/sw/tick.h +2 -0
  56. data/examples/or1200_test/sw/uart.c +136 -0
  57. data/examples/or1200_test/sw/uart.h +126 -0
  58. data/lib/soc_maker.rb +324 -0
  59. data/lib/soc_maker/cli.rb +544 -0
  60. data/lib/soc_maker/conf.rb +310 -0
  61. data/lib/soc_maker/core_def.rb +579 -0
  62. data/lib/soc_maker/core_inst.rb +305 -0
  63. data/lib/soc_maker/err.rb +211 -0
  64. data/lib/soc_maker/hdl_coder.rb +500 -0
  65. data/lib/soc_maker/hdl_file.rb +166 -0
  66. data/lib/soc_maker/hdl_parser.rb +431 -0
  67. data/lib/soc_maker/ifc_def.rb +193 -0
  68. data/lib/soc_maker/ifc_port.rb +133 -0
  69. data/lib/soc_maker/ifc_spc.rb +180 -0
  70. data/lib/soc_maker/lib.rb +289 -0
  71. data/lib/soc_maker/lib_inc.rb +109 -0
  72. data/lib/soc_maker/parameter.rb +149 -0
  73. data/lib/soc_maker/soc_def.rb +847 -0
  74. data/lib/soc_maker/sparameter.rb +289 -0
  75. data/lib/soc_maker/version.rb +8 -0
  76. data/lib/soc_maker/ypp.rb +130 -0
  77. data/soc_maker.gemspec +28 -0
  78. data/spec/cli_cmds1.txt +39 -0
  79. data/spec/cli_spec.rb +49 -0
  80. data/spec/conf_spec.rb +44 -0
  81. data/spec/core_def_spec.rb +503 -0
  82. data/spec/core_inst_spec.rb +169 -0
  83. data/spec/hdl_file_spec.rb +154 -0
  84. data/spec/hdl_parser_spec.rb +201 -0
  85. data/spec/ifc_def_spec.rb +121 -0
  86. data/spec/ifc_port_spec.rb +92 -0
  87. data/spec/ifc_spc_spec.rb +196 -0
  88. data/spec/lib_inc_spec.rb +99 -0
  89. data/spec/lib_spec.rb +209 -0
  90. data/spec/parameter_spec.rb +86 -0
  91. data/spec/soc_def_spec.rb +611 -0
  92. data/spec/soc_maker_spec.rb +7 -0
  93. data/spec/sparameter_spec.rb +182 -0
  94. data/spec/spec_helper.rb +78 -0
  95. data/spec/test_soc.yaml +105 -0
  96. data/spec/test_soc2.yaml +60 -0
  97. data/spec/test_soc_lib/cores/core_A_rel1/00_core_a.yaml +75 -0
  98. data/spec/test_soc_lib/cores/core_A_rel1/01_core_a.yaml +57 -0
  99. data/spec/test_soc_lib/cores/core_A_rel1/core_a.vhd +29 -0
  100. data/spec/test_soc_lib/cores/core_A_rel1/core_a_pkg.vhd.src +3 -0
  101. data/spec/test_soc_lib/cores/core_A_rel1/core_a_pkg2.vhd.src +4 -0
  102. data/spec/test_soc_lib/cores/core_A_rel1/core_a_pkg3.v.src +6 -0
  103. data/spec/test_soc_lib/cores/core_B_rel1/core_b.vhd +25 -0
  104. data/spec/test_soc_lib/cores/core_B_rel1/core_b.yaml +36 -0
  105. data/spec/test_soc_lib/cores/core_C_v1/core_C.vhd +57 -0
  106. data/spec/test_soc_lib/cores/core_C_v1/core_c.yaml +42 -0
  107. data/spec/test_soc_lib/cores/soc_A/soc_A.yaml +12 -0
  108. data/spec/test_soc_lib/cores/soc_maker_include.yaml +6 -0
  109. data/spec/test_soc_lib/ifcs/core_AB_ifc/bidir_ifc.yaml +19 -0
  110. data/spec/test_soc_lib/ifcs/core_AB_ifc/core_AB_ifc.yaml +15 -0
  111. data/spec/test_soc_lib/ifcs/core_AB_ifc/top_ifc.yaml +9 -0
  112. data/spec/test_soc_lib/soc_maker_include.yaml +4 -0
  113. data/spec/yaml_examples.rb +367 -0
  114. data/spec/ypp_spec.rb +156 -0
  115. data/test/test_soc_maker.rb +0 -0
  116. metadata +255 -0
@@ -0,0 +1,273 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+ xmlns:cc="http://creativecommons.org/ns#"
7
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+ xmlns:svg="http://www.w3.org/2000/svg"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+ width="637.46875"
13
+ height="371"
14
+ id="svg2"
15
+ version="1.1"
16
+ inkscape:version="0.48.4 r9939"
17
+ sodipodi:docname="hierarchical.svg">
18
+ <defs
19
+ id="defs4" />
20
+ <sodipodi:namedview
21
+ id="base"
22
+ pagecolor="#ffffff"
23
+ bordercolor="#666666"
24
+ borderopacity="1.0"
25
+ inkscape:pageopacity="0.0"
26
+ inkscape:pageshadow="2"
27
+ inkscape:zoom="0.7"
28
+ inkscape:cx="125.05033"
29
+ inkscape:cy="81.322066"
30
+ inkscape:document-units="px"
31
+ inkscape:current-layer="g3001-7-7"
32
+ showgrid="false"
33
+ inkscape:window-width="1433"
34
+ inkscape:window-height="876"
35
+ inkscape:window-x="501"
36
+ inkscape:window-y="137"
37
+ inkscape:window-maximized="0"
38
+ fit-margin-top="0"
39
+ fit-margin-left="0"
40
+ fit-margin-right="0"
41
+ fit-margin-bottom="0" />
42
+ <metadata
43
+ id="metadata7">
44
+ <rdf:RDF>
45
+ <cc:Work
46
+ rdf:about="">
47
+ <dc:format>image/svg+xml</dc:format>
48
+ <dc:type
49
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50
+ <dc:title></dc:title>
51
+ </cc:Work>
52
+ </rdf:RDF>
53
+ </metadata>
54
+ <g
55
+ inkscape:label="Layer 1"
56
+ inkscape:groupmode="layer"
57
+ id="layer1"
58
+ transform="translate(-48.0625,-147.5625)">
59
+ <rect
60
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
61
+ id="rect2985"
62
+ width="430"
63
+ height="370"
64
+ x="48.57143"
65
+ y="148.07646"
66
+ rx="25.309336"
67
+ ry="20.72126" />
68
+ <text
69
+ xml:space="preserve"
70
+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
71
+ x="64.649765"
72
+ y="175.54977"
73
+ id="text2993"
74
+ sodipodi:linespacing="125%"><tspan
75
+ sodipodi:role="line"
76
+ id="tspan2995"
77
+ x="64.649765"
78
+ y="175.54977">SOC</tspan></text>
79
+ <g
80
+ id="g3001"
81
+ transform="translate(-8.0812208,38.950514)">
82
+ <rect
83
+ ry="20.72126"
84
+ rx="25.309336"
85
+ y="320.93362"
86
+ x="80"
87
+ height="124.28571"
88
+ width="90"
89
+ id="rect2987"
90
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
91
+ <text
92
+ sodipodi:linespacing="125%"
93
+ id="text2997"
94
+ y="344.24527"
95
+ x="95.459412"
96
+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
97
+ xml:space="preserve"><tspan
98
+ y="344.24527"
99
+ x="95.459412"
100
+ id="tspan2999"
101
+ sodipodi:role="line">CORE</tspan></text>
102
+ </g>
103
+ <g
104
+ id="g3001-7"
105
+ transform="translate(113.396,38.950514)">
106
+ <rect
107
+ ry="20.72126"
108
+ rx="25.309336"
109
+ y="320.93362"
110
+ x="80"
111
+ height="124.28571"
112
+ width="90"
113
+ id="rect2987-6"
114
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
115
+ <text
116
+ sodipodi:linespacing="125%"
117
+ id="text2997-1"
118
+ y="344.24527"
119
+ x="94.954338"
120
+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
121
+ xml:space="preserve"><tspan
122
+ y="344.24527"
123
+ x="94.954338"
124
+ id="tspan2999-7"
125
+ sodipodi:role="line">CORE</tspan></text>
126
+ </g>
127
+ <g
128
+ id="g3001-7-7"
129
+ transform="translate(236.63461,38.950514)"
130
+ style="fill:#d4d4d4;fill-opacity:1;stroke:#000000;stroke-opacity:1">
131
+ <rect
132
+ ry="20.72126"
133
+ rx="25.309336"
134
+ y="320.93362"
135
+ x="80"
136
+ height="124.28571"
137
+ width="90"
138
+ id="rect2987-6-6"
139
+ style="fill:#d4d4d4;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
140
+ <text
141
+ sodipodi:linespacing="125%"
142
+ id="text2997-1-3"
143
+ y="344.24527"
144
+ x="103.03556"
145
+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
146
+ xml:space="preserve"><tspan
147
+ y="344.24527"
148
+ x="103.03556"
149
+ id="tspan2999-7-3"
150
+ sodipodi:role="line">SOC</tspan></text>
151
+ </g>
152
+ <g
153
+ id="g3001-7-2"
154
+ transform="translate(236.63461,-132.77541)">
155
+ <rect
156
+ ry="20.72126"
157
+ rx="25.309336"
158
+ y="320.93362"
159
+ x="80"
160
+ height="124.28571"
161
+ width="90"
162
+ id="rect2987-6-5"
163
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
164
+ <text
165
+ sodipodi:linespacing="125%"
166
+ id="text2997-1-0"
167
+ y="344.24527"
168
+ x="95.964493"
169
+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
170
+ xml:space="preserve"><tspan
171
+ y="344.24527"
172
+ x="95.964493"
173
+ id="tspan2999-7-0"
174
+ sodipodi:role="line">CORE</tspan></text>
175
+ </g>
176
+ <path
177
+ style="fill:none;stroke:#222222;stroke-width:1.29999995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
178
+ d="m 361.42857,313.07647 0,32.87201 -126.78571,-0.14794 0,12.63307"
179
+ id="path3087"
180
+ inkscape:connector-curvature="0"
181
+ sodipodi:nodetypes="cccc" />
182
+ <path
183
+ style="fill:none;stroke:#222222;stroke-width:1.29999995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
184
+ d="m 343.92857,313.07647 0,18.57143 -231.78571,0 0,27.5"
185
+ id="path3091"
186
+ inkscape:connector-curvature="0" />
187
+ <path
188
+ style="fill:none;stroke:#222222;stroke-width:1.29999995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
189
+ d="m 283.92857,429.50504 32.14286,0"
190
+ id="path3093"
191
+ inkscape:connector-curvature="0" />
192
+ <rect
193
+ style="fill:#d4d4d4;fill-opacity:1;fill-rule:nonzero;stroke:#222222;stroke-width:1.29999995;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
194
+ id="rect3882"
195
+ width="226.27417"
196
+ height="233.34525"
197
+ x="458.60928"
198
+ y="268.4838"
199
+ rx="25.309336"
200
+ ry="20.72126" />
201
+ <g
202
+ id="g3001-7-2-3"
203
+ transform="translate(397.24886,32.889594)">
204
+ <rect
205
+ ry="20.72126"
206
+ rx="25.309336"
207
+ y="320.93362"
208
+ x="80"
209
+ height="124.28571"
210
+ width="90"
211
+ id="rect2987-6-5-3"
212
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
213
+ <text
214
+ sodipodi:linespacing="125%"
215
+ id="text2997-1-0-3"
216
+ y="344.24527"
217
+ x="95.964493"
218
+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
219
+ xml:space="preserve"><tspan
220
+ y="344.24527"
221
+ x="95.964493"
222
+ id="tspan2999-7-0-8"
223
+ sodipodi:role="line">CORE</tspan></text>
224
+ </g>
225
+ <g
226
+ id="g3001-7-2-2"
227
+ transform="translate(507.35549,32.889594)">
228
+ <rect
229
+ ry="20.72126"
230
+ rx="25.309336"
231
+ y="320.93362"
232
+ x="80"
233
+ height="124.28571"
234
+ width="90"
235
+ id="rect2987-6-5-6"
236
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
237
+ <text
238
+ sodipodi:linespacing="125%"
239
+ id="text2997-1-0-32"
240
+ y="344.24527"
241
+ x="95.964493"
242
+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
243
+ xml:space="preserve"><tspan
244
+ y="344.24527"
245
+ x="95.964493"
246
+ id="tspan2999-7-0-89"
247
+ sodipodi:role="line">CORE</tspan></text>
248
+ </g>
249
+ <text
250
+ xml:space="preserve"
251
+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
252
+ x="473.24625"
253
+ y="297.87024"
254
+ id="text2993-7"
255
+ sodipodi:linespacing="125%"><tspan
256
+ sodipodi:role="line"
257
+ id="tspan2995-2"
258
+ x="473.24625"
259
+ y="297.87024">SOC</tspan></text>
260
+ <path
261
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
262
+ d="m 384.61558,484.15137 c 38.43782,-6.48314 64.36544,-2.3033 84.0952,13.63707"
263
+ id="path3945"
264
+ inkscape:connector-curvature="0"
265
+ sodipodi:nodetypes="cc" />
266
+ <path
267
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
268
+ d="m 384.71029,360.06045 c 55.20857,-4.29122 68.73191,-54.40701 74.53031,-75.98241"
269
+ id="path3947"
270
+ inkscape:connector-curvature="0"
271
+ sodipodi:nodetypes="cc" />
272
+ </g>
273
+ </svg>
@@ -0,0 +1,78 @@
1
+ #
2
+ #
3
+ # Please note: this code doesn't work at the moment, please use or1200_test.rb instead.
4
+ #
5
+ # run with ./bin/soc_maker_cli -l core_lib examples/or1200_test/or1200_test.cmd
6
+ #
7
+
8
+
9
+ list
10
+
11
+ new OR1200_Test_SOC or1200_test,v1 or1200_test
12
+
13
+ add_interface clk clk,1 1 clk 1
14
+ add_interface rst rst,1 1 rst 1
15
+
16
+ add_interface jtag_tap jtag_tap,1 1 tck 1 tdi 1 tdo 1 rst 1 shift 1 pause 1 update 1 capture 1 select 1
17
+ add_interface uart uart,1 1 stx_pad 1 srx_pad 1 rts_pad 1 cts_pad 1 dtr_pad 1 dsr_pad 1 ri_pad 1 dcd_pad 1
18
+
19
+ print
20
+
21
+ add or1200,rel2 cpu
22
+ add wb_connect,1 wb_bus
23
+ add adv_debug_sys,ads_3 dbg
24
+ add ram_wb,b3 ram1
25
+ add ram_wb,b3 ram2
26
+ add uart16550,rel4 uart
27
+
28
+
29
+
30
+ sparameter or1200,rel2 VCD_DUMP false
31
+ sparameter or1200,rel2 VERBOSE false
32
+ sparameter or1200,rel2 ASIC false
33
+ sparameter or1200,rel2 ASIC_MEM_CHOICE 0
34
+ sparameter or1200,rel2 ASIC_NO_DC true
35
+ sparameter or1200,rel2 ASIC_NO_IC true
36
+ sparameter or1200,rel2 ASIC_NO_DMMU true
37
+ sparameter or1200,rel2 ASIC_NO_IMMU true
38
+ sparameter or1200,rel2 ASIC_MUL_CHOICE 0
39
+ sparameter or1200,rel2 ASIC_IC_CHOICE 0
40
+ sparameter or1200,rel2 ASIC_DC_CHOICE 0
41
+ sparameter or1200,rel2 FPGA_MEM_CHOICE 2
42
+ sparameter or1200,rel2 FPGA_NO_DC true
43
+ sparameter or1200,rel2 FPGA_NO_IC true
44
+ sparameter or1200,rel2 FPGA_NO_DMMU true
45
+ sparameter or1200,rel2 FPGA_NO_IMMU true
46
+ sparameter or1200,rel2 FPGA_MUL_CHOICE 1
47
+ sparameter or1200,rel2 FPGA_IC_CHOICE 0
48
+ sparameter or1200,rel2 FPGA_DC_CHOICE 0
49
+
50
+ parameter ram1 mem_size_bytes 10240
51
+ parameter ram1 mem_adr_width 14
52
+ parameter ram2 mem_size_bytes 10240
53
+ parameter ram2 mem_adr_width 15
54
+
55
+
56
+
57
+ connect con_main_clk or1200_test clk cpu clk
58
+ connect con_main_rst or1200_test rst cpu rst
59
+
60
+ connect con_main_clk or1200_test clk wb_bus clk
61
+ connect con_main_rst or1200_test rst wb_bus rst
62
+
63
+ connect con_main_clk or1200_test clk dbg cpu0_dbg_clk
64
+
65
+ connect con_jtag_top or1200_test jtag_tap dbg jtag
66
+ connect con_uart_top or1200_test uart uart uart_ifc
67
+
68
+
69
+ connect con_wb_debug wb_bus i3 dbg wb_ifc
70
+ connect con_data wb_bus i4 cpu wb_data
71
+ connect con_instruction wb_bus i5 cpu wb_instruction
72
+ connect con_ram1 wb_bus t0 ram1 wb_ifc
73
+ connect con_ram2 wb_bus t1 ram2 wb_ifc
74
+ connect con_uart wb_bus t5 uart wb_ifc
75
+ connect con_debug dbg cpu0_dbg cpu ext_debug
76
+
77
+ generate
78
+ quit
@@ -0,0 +1,136 @@
1
+ require_relative '../../lib/soc_maker'
2
+
3
+ ##
4
+ # initialize SOCMaker core
5
+ # this sets up logging and parses all yaml files
6
+ # found in the configure path (see also soc_maker_conf.rb)
7
+ SOCMaker::load( libpath: './core_lib/' )
8
+
9
+
10
+ puts "Library Content:"
11
+
12
+
13
+ puts SOCMaker::lib
14
+
15
+
16
+ SOCMaker::lib.cores do |name_version, core|
17
+ # core.update_vcs
18
+ end
19
+
20
+ soc = SOCMaker::SOCDef.new( 'OR1200 Test SOC', 'or1200_test,v1', 'or1200_test' )
21
+ SOCMaker::lib.add_core( soc )
22
+ #soc_inst = SOCMaker::CoreInst.new( 'or1200_test,v1' )
23
+ #soc_inst.name = "soc_inst"
24
+
25
+
26
+ port = SOCMaker::IfcPort.new( 'clk', 1 )
27
+ ifc = SOCMaker::IfcDef.new( 'clk', 'clk,1', 1, { clk_i: port} )
28
+ soc.interfaces[ :clk_ifc ] = ifc
29
+
30
+ port = SOCMaker::IfcPort.new( 'rst', 1 )
31
+ ifc = SOCMaker::IfcDef.new( 'rst', 'rst,1', 1, { rst_i: port} )
32
+ soc.interfaces[ :rst_ifc ] = ifc
33
+
34
+ soc.interfaces[ 'jtag_ifc'.to_sym ] = SOCMaker::IfcDef.new( 'jtag_tap', 'jtag_tap,1', 1, {
35
+ tck_i: SOCMaker::IfcPort.new( 'tck', 1 ),
36
+ tdi_i: SOCMaker::IfcPort.new( 'tdi', 1 ),
37
+ tdo_o: SOCMaker::IfcPort.new( 'tdo' ,1 ),
38
+ debug_rst_i: SOCMaker::IfcPort.new( 'rst', 1 ),
39
+ shift_dr_i: SOCMaker::IfcPort.new( 'shift', 1 ),
40
+ pause_dr_i: SOCMaker::IfcPort.new( 'pause', 1 ),
41
+ update_dr_i: SOCMaker::IfcPort.new( 'update', 1 ),
42
+ capture_dr_i: SOCMaker::IfcPort.new( 'capture', 1 ),
43
+ debug_select_i: SOCMaker::IfcPort.new( 'select', 1 ) } )
44
+
45
+ soc.interfaces[ 'uart_ifc'.to_sym ] = SOCMaker::IfcDef.new( 'uart', 'uart,1', 1, {
46
+ stx_pad_o: SOCMaker::IfcPort.new( 'stx_pad', 1 ),
47
+ srx_pad_i: SOCMaker::IfcPort.new( 'srx_pad', 1 ),
48
+ rts_pad_o: SOCMaker::IfcPort.new( 'rts_pad', 1 ),
49
+ cts_pad_i: SOCMaker::IfcPort.new( 'cts_pad', 1 ),
50
+ dtr_pad_o: SOCMaker::IfcPort.new( 'dtr_pad', 1 ),
51
+ dsr_pad_i: SOCMaker::IfcPort.new( 'dsr_pad', 1 ),
52
+ ri_pad_i: SOCMaker::IfcPort.new( 'ri_pad' , 1 ),
53
+ dcd_pad_i: SOCMaker::IfcPort.new( 'dcd_pad', 1 ) } )
54
+
55
+
56
+ soc.add_core( :'or1200,rel2', :cpu )
57
+ soc.add_core( :'wb_connect,1', :wb_bus )
58
+ soc.add_core( :'adv_debug_sys,ads_3', :dbg )
59
+ soc.add_core( :'ram_wb,b3', :ram1 )
60
+ soc.add_core( :'ram_wb,b3', :ram2 )
61
+ soc.add_core( :'uart16550,rel4', :uart )
62
+ soc.consistence_check
63
+
64
+
65
+ #
66
+ # Setup the CPU
67
+ #
68
+ soc.set_sparam( :'or1200,rel2', :VCD_DUMP, false )
69
+ soc.set_sparam( :'or1200,rel2', :VERBOSE, false )
70
+ soc.set_sparam( :'or1200,rel2', :ASIC , false )
71
+
72
+ soc.set_sparam( :'or1200,rel2', :ASIC_MEM_CHOICE, 0 )
73
+ soc.set_sparam( :'or1200,rel2', :ASIC_NO_DC, true )
74
+ soc.set_sparam( :'or1200,rel2', :ASIC_NO_IC, true )
75
+ soc.set_sparam( :'or1200,rel2', :ASIC_NO_DMMU, true )
76
+ soc.set_sparam( :'or1200,rel2', :ASIC_NO_IMMU, true )
77
+ soc.set_sparam( :'or1200,rel2', :ASIC_MUL_CHOICE, 0 )
78
+ soc.set_sparam( :'or1200,rel2', :ASIC_IC_CHOICE, 0 )
79
+ soc.set_sparam( :'or1200,rel2', :ASIC_DC_CHOICE, 0 )
80
+
81
+ soc.set_sparam( :'or1200,rel2', :FPGA_MEM_CHOICE, 2 )
82
+ soc.set_sparam( :'or1200,rel2', :FPGA_NO_DC, true )
83
+ soc.set_sparam( :'or1200,rel2', :FPGA_NO_IC, true )
84
+ soc.set_sparam( :'or1200,rel2', :FPGA_NO_DMMU, true )
85
+ soc.set_sparam( :'or1200,rel2', :FPGA_NO_IMMU, true )
86
+ soc.set_sparam( :'or1200,rel2', :FPGA_MUL_CHOICE, 1 )
87
+ soc.set_sparam( :'or1200,rel2', :FPGA_IC_CHOICE, 0 )
88
+ soc.set_sparam( :'or1200,rel2', :FPGA_DC_CHOICE, 0 )
89
+
90
+ #
91
+ # Setup the on-chip memory
92
+ #
93
+ # soc.set_sparam( :'ram_wb,b3', :MEM_SIZE, 10 )
94
+ # soc.set_sparam( :'ram_wb,b3', :MEM_ADR_WIDTH, 14 )
95
+ soc.set_param( :ram1, :mem_size_bytes, 10*1024 )
96
+ soc.set_param( :ram1, :mem_adr_width, 14 )
97
+
98
+ soc.set_param( :ram2, :mem_size_bytes, 10*1024 )
99
+ soc.set_param( :ram2, :mem_adr_width, 15 )
100
+
101
+ ####
102
+ #
103
+ # connections to toplevel ports
104
+ #
105
+
106
+ # create connection for clk and rst
107
+ soc.add_connection( :con_main_clk, :or1200_test, :clk_ifc )
108
+ soc.add_connection( :con_main_rst, :or1200_test, :rst_ifc )
109
+
110
+ # connection clk and rst to cores
111
+ soc.add_connection( :con_main_clk, :cpu, :clk )
112
+ soc.add_connection( :con_main_rst, :cpu, :rst )
113
+ soc.add_connection( :con_main_clk, :wb_bus, :clk )
114
+ soc.add_connection( :con_main_rst, :wb_bus, :rst )
115
+ soc.add_connection( :con_main_clk, :dbg, :cpu0_dbg_clk )
116
+
117
+ # create and connect jtag as well as uart to cores
118
+ soc.add_connection( :con_jtag_top, :or1200_test, :jtag_ifc, :dbg, :jtag )
119
+ soc.add_connection( :con_uart_top, :or1200_test, :uart_ifc, :uart, :uart_ifc )
120
+
121
+
122
+
123
+ #
124
+ # core connections
125
+ #
126
+ soc.add_connection( :con_wb_debug , :wb_bus, :i3, :dbg, :wb_ifc )
127
+ soc.add_connection( :con_data , :wb_bus, :i4, :cpu, :wb_data )
128
+ soc.add_connection( :con_instruction, :wb_bus, :i5, :cpu, :wb_instruction )
129
+ soc.add_connection( :con_ram1 , :wb_bus, :t0, :ram1, :wb_ifc )
130
+ soc.add_connection( :con_ram2 , :wb_bus, :t1, :ram2, :wb_ifc )
131
+ soc.add_connection( :con_uart , :wb_bus, :t5, :uart, :wb_ifc )
132
+ soc.add_connection( :con_debug , :dbg, :cpu0_dbg, :cpu, :ext_debug )
133
+
134
+
135
+ SOCMaker::deploy_soc( soc )
136
+