origen_sim 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/version.rb +1 -1
- data/ext/bridge.c +4 -2
- data/lib/origen_sim.rb +1 -1
- data/lib/origen_sim/commands/build.rb +3 -3
- data/templates/rtl_v/origen.v.erb +20 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d43e76c0e9a55fc9cdbcc5ba241ab8e76386aff85d711aef54e7c68293c5f8f
|
4
|
+
data.tar.gz: 8f6582388d383142beebaf1c313936b78b6f495f0b2403193df02f8ae51f25f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfa8d2b63ba5af0b216bda43900b24db81735a11a49f604053b34771c55d42a99d3e6a0f190f6f24815542bee91d1f281c423ba5fcadd01ea5d6e4406ba913d6
|
7
|
+
data.tar.gz: 8a968093af5c18778e2835115f02c46ec3f638b1a5049124c9fe339dbe9007eb4f8a80aac3146a0e377aee0bcb920f147c54bf092b2721ccefd587614fee0fb6
|
data/config/version.rb
CHANGED
data/ext/bridge.c
CHANGED
@@ -222,7 +222,7 @@ static void bridge_enable_drive_wave(Pin * pin) {
|
|
222
222
|
|
223
223
|
|
224
224
|
static void bridge_disable_drive_wave(Pin * pin) {
|
225
|
-
Wave *wave = &
|
225
|
+
Wave *wave = &drive_waves[(*pin).drive_wave];
|
226
226
|
|
227
227
|
if ((*wave).active_pin_count == 0) {
|
228
228
|
vpi_printf("Wanted to disable drive on pin %i, but its drive wave has no active pins!\n", (*pin).index);
|
@@ -352,7 +352,9 @@ static void bridge_compare_pin(char * index, char * val) {
|
|
352
352
|
if ((*pin).previous_state != 2) {
|
353
353
|
bridge_enable_compare_wave(pin);
|
354
354
|
if ((*pin).previous_state == 1) {
|
355
|
-
|
355
|
+
if (!bridge_is_drive_whole_cycle(pin)) {
|
356
|
+
bridge_disable_drive_wave(pin);
|
357
|
+
}
|
356
358
|
}
|
357
359
|
(*pin).previous_state = 2;
|
358
360
|
}
|
data/lib/origen_sim.rb
CHANGED
@@ -141,7 +141,7 @@ else
|
|
141
141
|
puts " #{output_directory}/client.c \\"
|
142
142
|
puts ' -CFLAGS "-std=c99" \\'
|
143
143
|
puts ' +vpi \\'
|
144
|
-
puts "
|
144
|
+
puts " #{output_directory}/origen.c \\"
|
145
145
|
puts ' +define+ORIGEN_VPD=1 \\'
|
146
146
|
puts ' -debug_access+all \\'
|
147
147
|
puts ' -PP \\'
|
@@ -149,7 +149,7 @@ else
|
|
149
149
|
puts
|
150
150
|
puts 'Here is an example which may work for the file you just parsed (add additional -incdir options at the end if required):'
|
151
151
|
puts
|
152
|
-
puts " #{ENV['ORIGEN_SIM_VCS'] || 'vcs'} #{rtl_top} #{output_directory}/origen.v #{output_directory}/bridge.c #{output_directory}/client.c -CFLAGS \"-std=c99\" +vpi
|
152
|
+
puts " #{ENV['ORIGEN_SIM_VCS'] || 'vcs'} #{rtl_top} #{output_directory}/origen.v #{output_directory}/bridge.c #{output_directory}/client.c -CFLAGS \"-std=c99\" +vpi #{output_directory}/origen.c -timescale=1ns/1ns +define+ORIGEN_VPD=1 +incdir+#{Pathname.new(rtl_top).dirname} -debug_access+all -PP"
|
153
153
|
puts
|
154
154
|
puts 'Copy the following files (produced by vcs) to simulation/<target>/synopsys/. within your Origen application:'
|
155
155
|
puts
|
@@ -186,7 +186,7 @@ else
|
|
186
186
|
puts 'Add the following to your build script (AND REMOVE ANY OTHER TESTBENCH!):'
|
187
187
|
puts
|
188
188
|
puts " #{output_directory}/origen.v \\"
|
189
|
-
puts " #{output_directory}/
|
189
|
+
puts " #{output_directory}/bridge.c \\"
|
190
190
|
puts " #{output_directory}/client.c \\"
|
191
191
|
puts ' -CFLAGS "-std=c99" \\'
|
192
192
|
puts ' +vpi \\'
|
@@ -11,12 +11,14 @@
|
|
11
11
|
//
|
12
12
|
// 0 - Force data 0
|
13
13
|
// 1 - Force data 1
|
14
|
-
module pin_driver(error, pin, sync);
|
14
|
+
module pin_driver(error, pin, sync, match_loop);
|
15
15
|
parameter init_drive = 2; // Which means don't drive initially, set to 0 or 1 to drive
|
16
|
+
parameter pin_name = "undefined_name";
|
16
17
|
|
17
18
|
output reg error;
|
18
19
|
inout pin;
|
19
20
|
input sync;
|
21
|
+
input match_loop;
|
20
22
|
|
21
23
|
reg [1:0] data = 0;
|
22
24
|
reg [1:0] force_data = 0;
|
@@ -29,6 +31,7 @@ module pin_driver(error, pin, sync);
|
|
29
31
|
reg [127:0] sync_memory = 0;
|
30
32
|
|
31
33
|
wire drive_data = force_data[0] ? 0 : (force_data[1] ? 1 : data[0]);
|
34
|
+
wire contention = drive ? (pin !== drive_data ? 1 : 0) : 0;
|
32
35
|
|
33
36
|
assign pin = drive ? drive_data : 1'bz;
|
34
37
|
|
@@ -39,6 +42,19 @@ module pin_driver(error, pin, sync);
|
|
39
42
|
error = (compare && !capture) ? (pin == data[0] ? 0 : 1) : 0;
|
40
43
|
end
|
41
44
|
|
45
|
+
// pin compare failure logger
|
46
|
+
always @(posedge error) begin
|
47
|
+
if (match_loop != 1) begin
|
48
|
+
$display("OrigenSim Error: miscompare on pin %s, expected %d received %d at %t", pin_name, data[0], pin, $time);
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
// SMcG - needs more work, causes non-genuine fails in OrigenSim test case
|
53
|
+
//// pin contention logger
|
54
|
+
//always @(posedge contention) begin
|
55
|
+
// $display("OrigenSim Error: contention on pin %s, tester drives %d beginning at %t", pin_name, drive_data, $time);
|
56
|
+
//end
|
57
|
+
|
42
58
|
always @(posedge capture) begin
|
43
59
|
if (sync == 1) begin
|
44
60
|
sync_memory[127:1] <= sync_memory[126:0];
|
@@ -52,6 +68,8 @@ module pin_driver(error, pin, sync);
|
|
52
68
|
end
|
53
69
|
|
54
70
|
initial begin
|
71
|
+
// Set the timescale to ns (-9) with 0 decimal place precision, 20 chars
|
72
|
+
$timeformat(-9, 0, " ns", 20);
|
55
73
|
if (init_drive == 1) begin
|
56
74
|
drive = 1;
|
57
75
|
data[0] = 1;
|
@@ -95,7 +113,7 @@ module pin_drivers(errors, <%= dut.rtl_pins.map { |n, p, o| "#{p.id}_o" }.join('
|
|
95
113
|
end
|
96
114
|
|
97
115
|
% dut.rtl_pins.each do |name, pin, options|
|
98
|
-
pin_driver <%= pin.driving? ? "#
|
116
|
+
pin_driver #(.init_drive(<%= pin.driving? ? "#{pin.value}" : '2' %>), .pin_name("<%= pin.id %>")) <%= pin.id %>(.pin(<%= pin.id %>_o), .error(<%= pin.id %>_err), .sync(sync), .match_loop(match_loop));
|
99
117
|
% end
|
100
118
|
|
101
119
|
endmodule
|
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.
|
4
|
+
version: 0.14.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: 2018-
|
11
|
+
date: 2018-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.5.1
|
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:
|
54
|
+
version: 0.5.1
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- stephen.f.mcginty@gmail.com
|
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
version: 1.8.11
|
139
139
|
requirements: []
|
140
140
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.7.
|
141
|
+
rubygems_version: 2.7.6
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: Plugin that provides a testbench environment to simulate Origen test patterns
|