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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b34633d6530aedd5b581ff1bda44c6e727d72b76a3288dbde6f17c272c9b4a9
4
- data.tar.gz: 82a82bdc494d1f39e6a3e8a46361d2a21352543e0839fb96dcb4488615de5a1d
3
+ metadata.gz: 8d43e76c0e9a55fc9cdbcc5ba241ab8e76386aff85d711aef54e7c68293c5f8f
4
+ data.tar.gz: 8f6582388d383142beebaf1c313936b78b6f495f0b2403193df02f8ae51f25f0
5
5
  SHA512:
6
- metadata.gz: 6af3ed9ca21d9ed459ba26e0d4f7e1c3cbb491a26563376b8151bb51dce20f8d4ec21ff0cf058f5aa349e52d058aab09ee5b81e5203b08cdda1cb1a350eaefd3
7
- data.tar.gz: 2282439c82a90b725d3191d5ed7c61d1b1c1ade3db935f16beae43a60c202b62e78fa099d3614da5a68cfc1c5c8454e62dc05ee5aeb3fef0c9cf75e2c15f6626
6
+ metadata.gz: dfa8d2b63ba5af0b216bda43900b24db81735a11a49f604053b34771c55d42a99d3e6a0f190f6f24815542bee91d1f281c423ba5fcadd01ea5d6e4406ba913d6
7
+ data.tar.gz: 8a968093af5c18778e2835115f02c46ec3f638b1a5049124c9fe339dbe9007eb4f8a80aac3146a0e377aee0bcb920f147c54bf092b2721ccefd587614fee0fb6
@@ -1,6 +1,6 @@
1
1
  module OrigenSim
2
2
  MAJOR = 0
3
- MINOR = 13
3
+ MINOR = 14
4
4
  BUGFIX = 0
5
5
  DEV = nil
6
6
 
@@ -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 = &compare_waves[(*pin).drive_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
- bridge_disable_drive_wave(pin);
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
  }
@@ -36,7 +36,7 @@ module OrigenSim
36
36
  Tester.new(options.merge(vendor: :cadence), &block)
37
37
  end
38
38
 
39
- def self.synopsys(optoins = {}, &block)
39
+ def self.synopsys(options = {}, &block)
40
40
  Tester.new(options.merge(vendor: :synopsys), &block)
41
41
  end
42
42
 
@@ -141,7 +141,7 @@ else
141
141
  puts " #{output_directory}/client.c \\"
142
142
  puts ' -CFLAGS "-std=c99" \\'
143
143
  puts ' +vpi \\'
144
- puts " -use_vpiobj #{output_directory}/origen.c \\"
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 -use_vpiobj #{output_directory}/origen.c -timescale=1ns/1ns +define+ORIGEN_VPD=1 +incdir+#{Pathname.new(rtl_top).dirname} -debug_access+all -PP"
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}/brdige.c \\"
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? ? "#(#{pin.value}) " : '' %><%= pin.id %>(.pin(<%= pin.id %>_o), .error(<%= pin.id %>_err), .sync(sync));
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.13.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-10-04 00:00:00.000000000 Z
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: '0.5'
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: '0.5'
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.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