origen_sim 0.16.1 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,17 @@
1
1
  %#`include "<%= options[:top] %>"
2
2
 
3
+ // To create the big fonts - http://patorjk.com/software/taag/#p=display&f=Big
4
+
3
5
  `timescale 1ns/1ns
4
6
 
7
+ // _____ _ _ _ _ _____ _ _____ _
8
+ // | __ \(_) (_) | | | | __ (_) | __ \ (_)
9
+ // | | | |_ __ _ _| |_ __ _| | | |__) | _ __ | | | |_ __ ___ _____ _ __
10
+ // | | | | |/ _` | | __/ _` | | | ___/ | '_ \ | | | | '__| \ \ / / _ \ '__|
11
+ // | |__| | | (_| | | || (_| | | | | | | | | | | |__| | | | |\ V / __/ |
12
+ // |_____/|_|\__, |_|\__\__,_|_| |_| |_|_| |_| |_____/|_| |_| \_/ \___|_|
13
+ // __/ |
14
+ // |___/
5
15
  // 0 - Data
6
16
  // 1 - Reserved
7
17
  //
@@ -87,21 +97,85 @@ module pin_driver(pin, sync);
87
97
 
88
98
  endmodule
89
99
 
100
+
101
+ `ifdef ORIGEN_WREAL
102
+ // _ _____ _ _____ _
103
+ // /\ | | | __ (_) | __ \ (_)
104
+ // / \ _ __ __ _| | ___ __ _ | |__) | _ __ | | | |_ __ ___ _____ _ __
105
+ // / /\ \ | '_ \ / _` | |/ _ \ / _` | | ___/ | '_ \ | | | | '__| \ \ / / _ \ '__|
106
+ // / ____ \| | | | (_| | | (_) | (_| | | | | | | | | | |__| | | | |\ V / __/ |
107
+ // /_/ \_\_| |_|\__,_|_|\___/ \__, | |_| |_|_| |_| |_____/|_| |_| \_/ \___|_|
108
+ // __/ |
109
+ // |___/
110
+
111
+ // A simple WREAL pin driver that can drive real value on a pin or else hi-Z, when the driver is in
112
+ // hi-Z mode the value applied by any other driver connected to the pin can be measured by peeking
113
+ // the value on pin
114
+ module ana_pin_driver(pin);
115
+ inout pin;
116
+
117
+ wreal pin;
118
+
119
+ reg drive_en = 0;
120
+ real drive = 0.0; // Value that will be driven on pin when drive is enabled
121
+
122
+ assign pin = drive_en ? drive : `wrealZState;
123
+ endmodule
124
+ `endif
125
+
126
+
127
+ // _____ _ __ __ _ _
128
+ // | __ (_) | \/ | | | | |
129
+ // | |__) | _ __ ___ | \ / | ___ __| |_ _| | ___
130
+ // | ___/ | '_ \/ __| | |\/| |/ _ \ / _` | | | | |/ _ \
131
+ // | | | | | | \__ \ | | | | (_) | (_| | |_| | | __/
132
+ // |_| |_|_| |_|___/ |_| |_|\___/ \__,_|\__,_|_|\___|
133
+
134
+ // This module groups all pin drivers together and will be instantiated as origen.pins, individual pin
135
+ // drivers are therefore accessible via origen.pins.my_pin_name
90
136
  module pin_drivers(<%= dut.rtl_pins.map { |n, p, o| "#{p.id}_o" }.join(', ') %>);
91
137
 
92
138
  % dut.rtl_pins.each do |name, pin, options|
139
+ % if pin.type == :analog
140
+ `ifdef ORIGEN_WREAL
141
+ inout <%= pin.id %>_o;
142
+ `else
93
143
  output <%= pin.id %>_o;
144
+ `endif
145
+ % else
146
+ output <%= pin.id %>_o;
147
+ % end
94
148
  % end
95
149
 
150
+ `ifdef ORIGEN_WREAL
151
+ % dut.rtl_pins(type: :analog).each do |name, pin, options|
152
+ wreal <%= pin.id %>_o;
153
+ % end
154
+ `endif
155
+
96
156
  reg sync = 0;
97
157
 
98
158
  % dut.rtl_pins.each do |name, pin, options|
159
+ % if pin.type == :analog
160
+ `ifdef ORIGEN_WREAL
161
+ ana_pin_driver <%= pin.id %>(.pin(<%= pin.id %>_o));
162
+ `else
99
163
  pin_driver #(<%= pin.meta[:origen_sim_init_pin_state].nil? ? '' : ".init_drive(#{pin.meta[:origen_sim_init_pin_state]}), "%>.pin_name("<%= pin.id %>")) <%= pin.id %>(.pin(<%= pin.id %>_o), .sync(sync));
164
+ `endif
165
+ % else
166
+ pin_driver #(<%= pin.meta[:origen_sim_init_pin_state].nil? ? '' : ".init_drive(#{pin.meta[:origen_sim_init_pin_state]}), "%>.pin_name("<%= pin.id %>")) <%= pin.id %>(.pin(<%= pin.id %>_o), .sync(sync));
167
+ % end
100
168
  % end
101
169
 
102
-
103
170
  endmodule
104
171
 
172
+ // __ __ _ _ _
173
+ // | \/ | | | | | | |
174
+ // | \ / | ___| |_ __ _ __| | __ _| |_ __ _
175
+ // | |\/| |/ _ \ __/ _` |/ _` |/ _` | __/ _` |
176
+ // | | | | __/ || (_| | (_| | (_| | || (_| |
177
+ // |_| |_|\___|\__\__,_|\__,_|\__,_|\__\__,_|
178
+
105
179
  // Placeholder for user notes. This will be an empty module if no notes were given
106
180
  module user_details;
107
181
  parameter _AVAILABLE_DETAILS_ = "<%= options[:user_details].empty? ? "" : options[:user_details].keys.join(',') %>";
@@ -132,6 +206,17 @@ module snapshot_details;
132
206
 
133
207
  endmodule
134
208
 
209
+ // _____ _
210
+ // | __ \ | |
211
+ // | | | | ___| |__ _ _ __ _
212
+ // | | | |/ _ \ '_ \| | | |/ _` |
213
+ // | |__| | __/ |_) | |_| | (_| |
214
+ // |_____/ \___|_.__/ \__,_|\__, |
215
+ // __/ |
216
+ // |___/
217
+
218
+ // Instantiated as origen.debug, this module contains the error count, current pattern name and comments,
219
+ // metadata associated with the snapshot build, and other debug information
135
220
  module debug;
136
221
  reg [31:0] errors = 0;
137
222
  reg [15:0] marker = 0;
@@ -145,15 +230,38 @@ module debug;
145
230
  reg handshake;
146
231
 
147
232
  snapshot_details snapshot_details();
233
+
234
+ `ifdef ORIGEN_WREAL
235
+ reg wreal_enabled = 1;
236
+ `else
237
+ reg wreal_enabled = 0;
238
+ `endif
148
239
 
149
240
  endmodule
150
241
 
242
+ // _______ _ _ _______ ____
243
+ // |__ __| | | | | |__ __| _ \
244
+ // | | ___ _ __ ______| | _____ _____| | | | | |_) |
245
+ // | |/ _ \| '_ \______| | / _ \ \ / / _ \ | | | | _ <
246
+ // | | (_) | |_) | | |___| __/\ V / __/ | | | | |_) |
247
+ // |_|\___/| .__/ |______\___| \_/ \___|_| |_| |____/
248
+ // | |
249
+ // |_|
250
+
151
251
  module origen;
152
252
 
153
253
  reg finish = 0;
154
254
 
155
255
  % dut.rtl_pins.each do |name, pin, options|
256
+ % if pin.type == :analog
257
+ `ifdef ORIGEN_WREAL
258
+ wreal <%= pin.id %>;
259
+ `else
156
260
  wire <%= pin.id %>;
261
+ `endif
262
+ % else
263
+ wire <%= pin.id %>;
264
+ % end
157
265
  % end
158
266
 
159
267
  pin_drivers pins (
@@ -190,30 +298,24 @@ module origen;
190
298
 
191
299
  debug debug ();
192
300
 
193
- `ifdef ORIGEN_VCD
194
301
  initial
195
302
  begin
303
+ `ifdef ORIGEN_VCS
304
+ $origen_vcs_init;
305
+ `endif
306
+ `ifdef ORIGEN_VCD
196
307
  $dumpvars(0,origen);
197
- end
198
308
  `endif
199
-
200
309
  `ifdef ORIGEN_VPD
201
- initial
202
- begin
203
310
  $vcdplusfile("origen.vpd");
204
311
  $vcdpluson;
205
312
  $vcdplusmemon;
206
- end
207
313
  `endif
208
-
209
314
  `ifdef ORIGEN_FSDB
210
- initial
211
- begin
212
315
  $fsdbDumpfile("origen.fsdb");
213
316
  $fsdbDumpvars(0, "+all");
214
- end
215
317
  `endif
216
-
318
+ end
217
319
 
218
320
  always @(posedge finish) begin
219
321
  $finish(2);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen_sim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.1
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-25 00:00:00.000000000 Z
11
+ date: 2019-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.43.0
19
+ version: 0.44.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.43.0
26
+ version: 0.44.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: origen_testers
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 0.21.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 0.21.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: origen_verilog
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.5.2
47
+ version: 0.6.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.5.2
54
+ version: 0.6.0
55
55
  description:
56
56
  email:
57
57
  - stephen.f.mcginty@gmail.com
@@ -73,6 +73,7 @@ files:
73
73
  - ext/defines.h.erb
74
74
  - ext/origen.c
75
75
  - ext/origen.h
76
+ - ext/origen_tasks.tab
76
77
  - ext/vpi_user.h
77
78
  - lib/origen_sim.rb
78
79
  - lib/origen_sim/commands/build.rb
@@ -97,6 +98,7 @@ files:
97
98
  - lib/origen_sim_dev/dut.rb
98
99
  - lib/origen_sim_dev/ip.rb
99
100
  - lib/tasks/origen_sim.rake
101
+ - pattern/concurrent_ip.rb
100
102
  - pattern/ip1_test.rb
101
103
  - pattern/ip2_test.rb
102
104
  - pattern/test.rb
@@ -107,10 +109,12 @@ files:
107
109
  - templates/empty.rc
108
110
  - templates/empty.svcf
109
111
  - templates/empty.tcl
112
+ - templates/origen_guides/simulation/ams.md.erb
110
113
  - templates/origen_guides/simulation/app.md.erb
111
114
  - templates/origen_guides/simulation/artifacts.md.erb
112
115
  - templates/origen_guides/simulation/compiling.md.erb
113
116
  - templates/origen_guides/simulation/debugging.md.erb
117
+ - templates/origen_guides/simulation/direct.md.erb
114
118
  - templates/origen_guides/simulation/environment.md.erb
115
119
  - templates/origen_guides/simulation/flows.md.erb
116
120
  - templates/origen_guides/simulation/howitworks.md.erb
@@ -143,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
147
  version: 1.8.11
144
148
  requirements: []
145
149
  rubyforge_project:
146
- rubygems_version: 2.7.6
150
+ rubygems_version: 2.7.7
147
151
  signing_key:
148
152
  specification_version: 4
149
153
  summary: Plugin that provides a testbench environment to simulate Origen test patterns