diff options
Diffstat (limited to 'src/systemc/tests/systemc/tracing/vcd_trace')
42 files changed, 5381 insertions, 0 deletions
diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/sc_signal_ports/golden/test.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/sc_signal_ports/golden/test.vcd new file mode 100644 index 000000000..f6330342b --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/sc_signal_ports/golden/test.vcd @@ -0,0 +1,202 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 32 aaaaa sig_int [31:0] $end +$var wire 1 aaaab sig_bool $end +$var wire 1 aaaac sig_logic $end +$var wire 1 aaaad sig_resolved $end +$var wire 1 aaaae sig_rv1 $end +$scope module a $end +$var wire 1 aaaaf out_rv1 $end +$var wire 1 aaaag out_resolved $end +$var wire 1 aaaah out_logic $end +$var wire 1 aaaai out_bool $end +$var wire 32 aaaaj out_int [31:0] $end +$var wire 1 aaaak in_rv1 $end +$var wire 1 aaaal in_resolved $end +$var wire 1 aaaam in_logic $end +$var wire 1 aaaan in_bool $end +$var wire 32 aaaao in_int [31:0] $end +$upscope $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b0 aaaaa +0aaaab +xaaaac +xaaaad +Xaaaae +Xaaaaf +xaaaag +xaaaah +0aaaai +b0 aaaaj +Xaaaak +xaaaal +xaaaam +0aaaan +b0 aaaao +$end + +#1000 +b1 aaaaa +1aaaab +1aaaac +1aaaad +1aaaae +1aaaaf +1aaaag +1aaaah +1aaaai +b1 aaaaj +1aaaak +1aaaal +1aaaam +1aaaan +b1 aaaao + +#2000 +b10 aaaaa +0aaaab +zaaaac +zaaaad +Zaaaae +Zaaaaf +zaaaag +zaaaah +0aaaai +b10 aaaaj +Zaaaak +zaaaal +zaaaam +0aaaan +b10 aaaao + +#3000 +b11 aaaaa +1aaaab +xaaaac +xaaaad +Xaaaae +Xaaaaf +xaaaag +xaaaah +1aaaai +b11 aaaaj +Xaaaak +xaaaal +xaaaam +1aaaan +b11 aaaao + +#4000 +b100 aaaaa +0aaaab +0aaaac +0aaaad +0aaaae +0aaaaf +0aaaag +0aaaah +0aaaai +b100 aaaaj +0aaaak +0aaaal +0aaaam +0aaaan +b100 aaaao + +#5000 +b101 aaaaa +1aaaab +1aaaac +1aaaad +1aaaae +1aaaaf +1aaaag +1aaaah +1aaaai +b101 aaaaj +1aaaak +1aaaal +1aaaam +1aaaan +b101 aaaao + +#6000 +b110 aaaaa +0aaaab +zaaaac +zaaaad +Zaaaae +Zaaaaf +zaaaag +zaaaah +0aaaai +b110 aaaaj +Zaaaak +zaaaal +zaaaam +0aaaan +b110 aaaao + +#7000 +b111 aaaaa +1aaaab +xaaaac +xaaaad +Xaaaae +Xaaaaf +xaaaag +xaaaah +1aaaai +b111 aaaaj +Xaaaak +xaaaal +xaaaam +1aaaan +b111 aaaao + +#8000 +b1000 aaaaa +0aaaab +0aaaac +0aaaad +0aaaae +0aaaaf +0aaaag +0aaaah +0aaaai +b1000 aaaaj +0aaaak +0aaaal +0aaaam +0aaaan +b1000 aaaao + +#9000 +b1001 aaaaa +1aaaab +1aaaac +1aaaad +1aaaae +1aaaaf +1aaaag +1aaaah +1aaaai +b1001 aaaaj +1aaaak +1aaaal +1aaaam +1aaaan +b1001 aaaao + +#10000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/sc_signal_ports/test.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/sc_signal_ports/test.cpp new file mode 100644 index 000000000..276941ca0 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/sc_signal_ports/test.cpp @@ -0,0 +1,144 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test.cpp -- + + Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +// test of signal port tracing. + +#include "systemc.h" + +SC_MODULE( mod_a ) +{ + sc_in_clk clk; + + sc_in<int> in_int; + sc_in<bool> in_bool; + sc_in<sc_logic> in_logic; + sc_in_resolved in_resolved; + sc_in_rv<1> in_rv1; + + sc_out<int> out_int; + sc_out<bool> out_bool; + sc_out<sc_logic> out_logic; + sc_out_resolved out_resolved; + sc_out_rv<1> out_rv1; + + void main_action() + { + int a_int = 0; + bool a_bool = false; + sc_logic a_logic = SC_LOGIC_X; + sc_logic a_resolved = SC_LOGIC_X; + sc_lv<1> a_rv1 = sc_lv<1>( SC_LOGIC_X ); + + wait(); + + while( true ) { + out_int = a_int; + out_bool = a_bool; + out_logic = a_logic; + out_resolved = a_resolved; + out_rv1 = a_rv1; + + a_int ++; + a_bool = ! a_bool; + a_logic = sc_dt::sc_logic_value_t( a_int % 4 ); + a_resolved = a_logic; + a_rv1 = sc_lv<1>( a_logic ); + + wait(); + } + } + + SC_CTOR( mod_a ) + { + SC_THREAD( main_action ); + sensitive << clk.pos(); + } +}; + +int +sc_main( int, char*[] ) +{ + sc_clock clk; + + sc_signal<int> sig_int; + sc_signal<bool> sig_bool; + sc_signal<sc_logic> sig_logic; + sc_signal_resolved sig_resolved; + sc_signal_rv<1> sig_rv1; + + mod_a a( "a" ); + + a.clk( clk ); + + a.in_int( sig_int ); + a.in_bool( sig_bool ); + a.in_logic( sig_logic ); + a.in_resolved( sig_resolved ); + a.in_rv1( sig_rv1 ); + + a.out_int( sig_int ); + a.out_bool( sig_bool ); + a.out_logic( sig_logic ); + a.out_resolved( sig_resolved ); + a.out_rv1( sig_rv1 ); + + sc_trace_file* tf = sc_create_vcd_trace_file( "test" ); + + sc_trace( tf, sig_int, "sig_int" ); + sc_trace( tf, sig_bool, "sig_bool" ); + sc_trace( tf, sig_logic, "sig_logic" ); + sc_trace( tf, sig_resolved, "sig_resolved" ); + sc_trace( tf, sig_rv1, "sig_rv1" ); + + sc_trace( tf, a.in_int, "a.in_int" ); + sc_trace( tf, a.in_bool, "a.in_bool" ); + sc_trace( tf, a.in_logic, "a.in_logic" ); + sc_trace( tf, a.in_resolved, "a.in_resolved" ); + sc_trace( tf, a.in_rv1, "a.in_rv1" ); + + sc_trace( tf, a.out_int, "a.out_int" ); + sc_trace( tf, a.out_bool, "a.out_bool" ); + sc_trace( tf, a.out_logic, "a.out_logic" ); + sc_trace( tf, a.out_resolved, "a.out_resolved" ); + sc_trace( tf, a.out_rv1, "a.out_rv1" ); + + sc_start( 10, SC_NS ); + + sc_close_vcd_trace_file( tf ); + + return 0; +} diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test01/golden/test01.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test01/golden/test01.vcd new file mode 100644 index 000000000..2c425a471 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test01/golden/test01.vcd @@ -0,0 +1,126 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 1 aaaaa Bool $end +$var wire 1 aaaab SC_Logic $end +$var wire 4 aaaac SC_BV [3:0] $end +$var wire 4 aaaad SC_LV [3:0] $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +0aaaaa +1aaaab +b0 aaaac +b1111 aaaad +$end + +#10000 +1aaaaa +0aaaab +b1010 aaaac +b1011 aaaad + +#20000 +b101 aaaac +b101 aaaad + +#30000 +0aaaaa +1aaaab +b0 aaaac +b1111 aaaad + +#40000 +1aaaaa +0aaaab +b1010 aaaac +b1011 aaaad + +#50000 +b110 aaaac +b110 aaaad + +#60000 +0aaaaa +1aaaab +b0 aaaac +b1111 aaaad + +#70000 +1aaaaa +0aaaab +b1010 aaaac +b1011 aaaad + +#80000 +b111 aaaac +b111 aaaad + +#90000 +0aaaaa +1aaaab +b0 aaaac +b1111 aaaad + +#100000 +1aaaaa +0aaaab +b1010 aaaac +b1011 aaaad + +#110000 +b1000 aaaac +b1000 aaaad + +#120000 +0aaaaa +1aaaab +b0 aaaac +b1111 aaaad + +#130000 +1aaaaa +0aaaab +b1010 aaaac +b1011 aaaad + +#140000 +b1001 aaaac +b1001 aaaad + +#150000 +0aaaaa +1aaaab +b0 aaaac +b1111 aaaad + +#160000 +1aaaaa +0aaaab +b1010 aaaac +b1011 aaaad + +#170000 +b1010 aaaad + +#180000 +0aaaaa +1aaaab +b0 aaaac +b1111 aaaad + +#190000 +1aaaaa +0aaaab +b1010 aaaac +b1011 aaaad + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test01/test01.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test01/test01.cpp new file mode 100644 index 000000000..39e0fded1 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test01/test01.cpp @@ -0,0 +1,117 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test01.cpp -- + + Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#include "systemc.h" + +SC_MODULE( proc1 ) +{ + SC_HAS_PROCESS( proc1 ); + + sc_in<bool> clk; + + bool obj1; + sc_logic obj2; + sc_bv<4> obj3; + sc_lv<4> obj4; + + proc1( sc_module_name NAME, + sc_signal<bool>& CLK ) + { + clk(CLK); + SC_THREAD( entry ); + sensitive << clk; + obj1 = 0; + obj2 = 0; + obj3 = "0000"; + obj4 = "0000"; + } + + void entry(); +}; + +void proc1::entry() +{ + sc_bv<4> bv; + sc_lv<4> sv; + int i = 5; + wait(); + while(true) { + bv = i; + sv = i++; + obj1 = 0; + obj2 = 1; + obj3 = "0000"; + obj4 = "1111"; + wait(); + obj1 = 1; + obj2 = 0; + obj3 = "1010"; + obj4 = "1011"; + wait(); + obj3 = bv; + obj4 = sv; + wait(); + } +} + + +int sc_main(int ac, char *av[]) +{ + sc_trace_file *tf; + sc_signal<bool> clock; + + proc1 P1("P1", clock); + + tf = sc_create_vcd_trace_file("test01"); + tf->set_time_unit(1.0, SC_PS); + sc_trace(tf, P1.obj1, "Bool"); + sc_trace(tf, P1.obj2, "SC_Logic"); + sc_trace(tf, P1.obj3, "SC_BV"); + sc_trace(tf, P1.obj4, "SC_LV"); + //sc_trace(tf, clock, "Clock"); + + clock.write(0); + sc_start(0, SC_NS); + for (int i = 0; i< 10; i++) { + clock.write(1); + sc_start(10, SC_NS); + clock.write(0); + sc_start(10, SC_NS); + } + sc_close_vcd_trace_file( tf ); + return 0; +} diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd new file mode 100644 index 000000000..10a09a376 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd @@ -0,0 +1,160 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 8 aaaaa Char [7:0] $end +$var wire 16 aaaab Short [15:0] $end +$var wire 32 aaaac Int [31:0] $end +$var wire 32 aaaad Long [31:0] $end +$var wire 1 aaaae Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae +$end + +#10000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#20000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#30000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#40000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#50000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#60000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#70000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#80000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#90000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#100000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#110000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#120000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#130000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#140000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#150000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#160000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#170000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#180000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#190000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.bsd64 b/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.bsd64 new file mode 100644 index 000000000..21100dc36 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.bsd64 @@ -0,0 +1,160 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 8 aaaaa Char [7:0] $end +$var wire 16 aaaab Short [15:0] $end +$var wire 32 aaaac Int [31:0] $end +$var wire 64 aaaad Long [63:0] $end +$var wire 1 aaaae Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae +$end + +#10000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#20000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#30000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#40000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#50000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#60000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#70000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#80000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#90000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#100000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#110000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#120000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#130000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#140000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#150000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#160000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#170000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#180000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#190000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.cygwin64 b/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.cygwin64 new file mode 100644 index 000000000..21100dc36 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.cygwin64 @@ -0,0 +1,160 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 8 aaaaa Char [7:0] $end +$var wire 16 aaaab Short [15:0] $end +$var wire 32 aaaac Int [31:0] $end +$var wire 64 aaaad Long [63:0] $end +$var wire 1 aaaae Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae +$end + +#10000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#20000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#30000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#40000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#50000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#60000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#70000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#80000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#90000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#100000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#110000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#120000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#130000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#140000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#150000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#160000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#170000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#180000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#190000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.linux64 b/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.linux64 new file mode 100644 index 000000000..21100dc36 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.linux64 @@ -0,0 +1,160 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 8 aaaaa Char [7:0] $end +$var wire 16 aaaab Short [15:0] $end +$var wire 32 aaaac Int [31:0] $end +$var wire 64 aaaad Long [63:0] $end +$var wire 1 aaaae Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae +$end + +#10000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#20000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#30000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#40000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#50000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#60000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#70000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#80000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#90000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#100000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#110000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#120000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#130000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#140000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#150000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#160000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#170000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#180000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#190000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.linuxaarch64 b/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.linuxaarch64 new file mode 100644 index 000000000..21100dc36 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.linuxaarch64 @@ -0,0 +1,160 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 8 aaaaa Char [7:0] $end +$var wire 16 aaaab Short [15:0] $end +$var wire 32 aaaac Int [31:0] $end +$var wire 64 aaaad Long [63:0] $end +$var wire 1 aaaae Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae +$end + +#10000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#20000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#30000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#40000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#50000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#60000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#70000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#80000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#90000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#100000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#110000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#120000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#130000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#140000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#150000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#160000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#170000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#180000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#190000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.macosx64 b/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.macosx64 new file mode 100644 index 000000000..21100dc36 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test02/golden/test02.vcd.macosx64 @@ -0,0 +1,160 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 8 aaaaa Char [7:0] $end +$var wire 16 aaaab Short [15:0] $end +$var wire 32 aaaac Int [31:0] $end +$var wire 64 aaaad Long [63:0] $end +$var wire 1 aaaae Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae +$end + +#10000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#20000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#30000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#40000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#50000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#60000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#70000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#80000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#90000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#100000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#110000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#120000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#130000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#140000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#150000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#160000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#170000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#180000 +b111 aaaaa +b11111 aaaab +b1111111111 aaaac +b11111111111 aaaad +1aaaae + +#190000 +b1 aaaaa +b100000 aaaab +b10000000000 aaaac +b100000000000 aaaad +0aaaae + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test02/test02.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test02/test02.cpp new file mode 100644 index 000000000..d69a71802 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test02/test02.cpp @@ -0,0 +1,108 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test02.cpp -- + + Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#include "systemc.h" + +SC_MODULE( proc1 ) +{ + SC_HAS_PROCESS( proc1 ); + + sc_in<bool> clk; + + unsigned char obj1; + unsigned short obj2; + unsigned int obj3; + unsigned long obj4; + + proc1( sc_module_name NAME, + sc_signal<bool>& CLK ) + { + clk(CLK); + SC_THREAD( entry ); + sensitive << clk; + obj1 = 0; + obj2 = 0; + obj3 = 0; + obj4 = 0; + } + + void entry(); +}; + +void proc1::entry() +{ + wait(); + while(true) { + obj1 = 7; + obj2 = 31; + obj3 = 1023; + obj4 = 2047; + wait(); + obj1 = 1; + obj2 = 32; + obj3 = 1024; + obj4 = 2048; + wait(); + } +} + + +int sc_main(int ac, char *av[]) +{ + sc_trace_file *tf; + sc_signal<bool> clock; + + proc1 P1("P1", clock); + + tf = sc_create_vcd_trace_file("test02"); + sc_trace(tf, P1.obj1, "Char"); + sc_trace(tf, P1.obj2, "Short"); + sc_trace(tf, P1.obj3, "Int"); + sc_trace(tf, P1.obj4, "Long"); + sc_trace(tf, clock, "Clock"); + + clock.write(0); + sc_start(0, SC_NS); + for (int i = 0; i< 10; i++) { + clock.write(1); + sc_start(10, SC_NS); + clock.write(0); + sc_start(10, SC_NS); + } + sc_close_vcd_trace_file( tf ); + return 0; +} diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test03/golden/test03.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test03/golden/test03.vcd new file mode 100644 index 000000000..f1bf6667c --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test03/golden/test03.vcd @@ -0,0 +1,181 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 4 aaaaa Char [3:0] $end +$var wire 4 aaaab Short [3:0] $end +$var wire 12 aaaac Int [11:0] $end +$var wire 10 aaaad Long [9:0] $end +$var wire 43 aaaae Uint64 [42:0] $end +$var wire 1 aaaaf Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +bx aaaab +b1111111111 aaaac +b111111 aaaad +b1000000000000000000000000000000000000000000 aaaae +1aaaaf +$end + +#10000 +b1 aaaaa +b11 aaaab +b10000000000 aaaac +bx aaaad +bx aaaae +0aaaaf + +#20000 +b111 aaaaa +bx aaaab +b1111111111 aaaac +b111111 aaaad +b1000000000000000000000000000000000000000000 aaaae +1aaaaf + +#30000 +b1 aaaaa +b11 aaaab +b10000000000 aaaac +bx aaaad +bx aaaae +0aaaaf + +#40000 +b111 aaaaa +bx aaaab +b1111111111 aaaac +b111111 aaaad +b1000000000000000000000000000000000000000000 aaaae +1aaaaf + +#50000 +b1 aaaaa +b11 aaaab +b10000000000 aaaac +bx aaaad +bx aaaae +0aaaaf + +#60000 +b111 aaaaa +bx aaaab +b1111111111 aaaac +b111111 aaaad +b1000000000000000000000000000000000000000000 aaaae +1aaaaf + +#70000 +b1 aaaaa +b11 aaaab +b10000000000 aaaac +bx aaaad +bx aaaae +0aaaaf + +#80000 +b111 aaaaa +bx aaaab +b1111111111 aaaac +b111111 aaaad +b1000000000000000000000000000000000000000000 aaaae +1aaaaf + +#90000 +b1 aaaaa +b11 aaaab +b10000000000 aaaac +bx aaaad +bx aaaae +0aaaaf + +#100000 +b111 aaaaa +bx aaaab +b1111111111 aaaac +b111111 aaaad +b1000000000000000000000000000000000000000000 aaaae +1aaaaf + +#110000 +b1 aaaaa +b11 aaaab +b10000000000 aaaac +bx aaaad +bx aaaae +0aaaaf + +#120000 +b111 aaaaa +bx aaaab +b1111111111 aaaac +b111111 aaaad +b1000000000000000000000000000000000000000000 aaaae +1aaaaf + +#130000 +b1 aaaaa +b11 aaaab +b10000000000 aaaac +bx aaaad +bx aaaae +0aaaaf + +#140000 +b111 aaaaa +bx aaaab +b1111111111 aaaac +b111111 aaaad +b1000000000000000000000000000000000000000000 aaaae +1aaaaf + +#150000 +b1 aaaaa +b11 aaaab +b10000000000 aaaac +bx aaaad +bx aaaae +0aaaaf + +#160000 +b111 aaaaa +bx aaaab +b1111111111 aaaac +b111111 aaaad +b1000000000000000000000000000000000000000000 aaaae +1aaaaf + +#170000 +b1 aaaaa +b11 aaaab +b10000000000 aaaac +bx aaaad +bx aaaae +0aaaaf + +#180000 +b111 aaaaa +bx aaaab +b1111111111 aaaac +b111111 aaaad +b1000000000000000000000000000000000000000000 aaaae +1aaaaf + +#190000 +b1 aaaaa +b11 aaaab +b10000000000 aaaac +bx aaaad +bx aaaae +0aaaaf + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test03/test03.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test03/test03.cpp new file mode 100644 index 000000000..3d53b4eb7 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test03/test03.cpp @@ -0,0 +1,115 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test03.cpp -- + + Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#include "systemc.h" + +SC_MODULE( proc1 ) +{ + SC_HAS_PROCESS( proc1 ); + + sc_in<bool> clk; + + unsigned char obj1; + unsigned short obj2; + unsigned int obj3; + unsigned long obj4; + uint64 obj5; + + proc1( sc_module_name NAME, + sc_signal<bool>& CLK ) + { + clk(CLK); + SC_THREAD( entry ); + sensitive << clk; + obj1 = 0; + obj2 = 0; + obj3 = 0; + obj4 = 0; + obj5 = 0; + } + + void entry(); +}; + +void proc1::entry() +{ + wait(); + while(true) { + obj1 = 7; + obj2 = 31; + obj3 = 1023; + obj4 = 63; + obj5 = 1; + obj5 = obj5 << 42; + wait(); + obj1 = 1; + obj2 = 3; + obj3 = 1024; + obj4 = 2048; + obj5 = 3; + obj5 = obj5 << 42; + wait(); + } +} + + +int sc_main(int ac, char *av[]) +{ + sc_trace_file *tf; + sc_signal<bool> clock; + + proc1 P1("P1", clock); + + tf = sc_create_vcd_trace_file("test03"); + sc_trace(tf, P1.obj1, "Char", 4); + sc_trace(tf, P1.obj2, "Short", 4); + sc_trace(tf, P1.obj3, "Int", 12); + sc_trace(tf, P1.obj4, "Long", 10); + sc_trace(tf, P1.obj5, "Uint64", 43); + sc_trace(tf, clock, "Clock"); + + clock.write(0); + sc_start(0, SC_NS); + for (int i = 0; i< 10; i++) { + clock.write(1); + sc_start(10, SC_NS); + clock.write(0); + sc_start(10, SC_NS); + } + sc_close_vcd_trace_file( tf ); + return 0; +} diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd new file mode 100644 index 000000000..c2129bb0e --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd @@ -0,0 +1,181 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 8 aaaaa Char [7:0] $end +$var wire 16 aaaab Short [15:0] $end +$var wire 32 aaaac Int [31:0] $end +$var wire 32 aaaad Long [31:0] $end +$var wire 64 aaaae Int64 [63:0] $end +$var wire 1 aaaaf Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf +$end + +#10000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b11111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#20000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#30000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b11111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#40000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#50000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b11111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#60000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#70000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b11111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#80000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#90000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b11111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#100000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#110000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b11111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#120000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#130000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b11111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#140000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#150000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b11111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#160000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#170000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b11111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#180000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#190000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b11111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.bsd64 b/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.bsd64 new file mode 100644 index 000000000..538167b24 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.bsd64 @@ -0,0 +1,181 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 8 aaaaa Char [7:0] $end +$var wire 16 aaaab Short [15:0] $end +$var wire 32 aaaac Int [31:0] $end +$var wire 64 aaaad Long [63:0] $end +$var wire 64 aaaae Int64 [63:0] $end +$var wire 1 aaaaf Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf +$end + +#10000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#20000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#30000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#40000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#50000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#60000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#70000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#80000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#90000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#100000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#110000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#120000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#130000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#140000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#150000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#160000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#170000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#180000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#190000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.cygwin64 b/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.cygwin64 new file mode 100644 index 000000000..538167b24 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.cygwin64 @@ -0,0 +1,181 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 8 aaaaa Char [7:0] $end +$var wire 16 aaaab Short [15:0] $end +$var wire 32 aaaac Int [31:0] $end +$var wire 64 aaaad Long [63:0] $end +$var wire 64 aaaae Int64 [63:0] $end +$var wire 1 aaaaf Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf +$end + +#10000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#20000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#30000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#40000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#50000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#60000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#70000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#80000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#90000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#100000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#110000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#120000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#130000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#140000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#150000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#160000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#170000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#180000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#190000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.linux64 b/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.linux64 new file mode 100644 index 000000000..538167b24 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.linux64 @@ -0,0 +1,181 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 8 aaaaa Char [7:0] $end +$var wire 16 aaaab Short [15:0] $end +$var wire 32 aaaac Int [31:0] $end +$var wire 64 aaaad Long [63:0] $end +$var wire 64 aaaae Int64 [63:0] $end +$var wire 1 aaaaf Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf +$end + +#10000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#20000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#30000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#40000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#50000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#60000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#70000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#80000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#90000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#100000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#110000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#120000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#130000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#140000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#150000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#160000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#170000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#180000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#190000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.linuxaarch64 b/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.linuxaarch64 new file mode 100644 index 000000000..538167b24 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.linuxaarch64 @@ -0,0 +1,181 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 8 aaaaa Char [7:0] $end +$var wire 16 aaaab Short [15:0] $end +$var wire 32 aaaac Int [31:0] $end +$var wire 64 aaaad Long [63:0] $end +$var wire 64 aaaae Int64 [63:0] $end +$var wire 1 aaaaf Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf +$end + +#10000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#20000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#30000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#40000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#50000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#60000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#70000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#80000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#90000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#100000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#110000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#120000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#130000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#140000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#150000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#160000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#170000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#180000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#190000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.macosx64 b/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.macosx64 new file mode 100644 index 000000000..538167b24 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test04/golden/test04.vcd.macosx64 @@ -0,0 +1,181 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 8 aaaaa Char [7:0] $end +$var wire 16 aaaab Short [15:0] $end +$var wire 32 aaaac Int [31:0] $end +$var wire 64 aaaad Long [63:0] $end +$var wire 64 aaaae Int64 [63:0] $end +$var wire 1 aaaaf Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf +$end + +#10000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#20000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#30000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#40000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#50000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#60000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#70000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#80000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#90000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#100000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#110000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#120000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#130000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#140000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#150000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#160000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#170000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#180000 +b111 aaaaa +b11111 aaaab +b11111111111111111111110000000001 aaaac +b11111111111 aaaad +b1111111111111111111111111111111111111111 aaaae +1aaaaf + +#190000 +b1 aaaaa +b1111111111111110 aaaab +b10000000000 aaaac +b1111111111111111111111111111111111111111111111111111100000000000 aaaad +b1111111111111111111111110000000000000000000000000000000000000000 aaaae +0aaaaf + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test04/test04.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test04/test04.cpp new file mode 100644 index 000000000..546b3ca55 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test04/test04.cpp @@ -0,0 +1,114 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test04.cpp -- + + Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#include "systemc.h" + +SC_MODULE( proc1 ) +{ + SC_HAS_PROCESS( proc1 ); + + sc_in<bool> clk; + + char obj1; + short obj2; + int obj3; + long obj4; + int64 obj5; + + proc1( sc_module_name NAME, + sc_signal<bool>& CLK ) + { + clk(CLK); + SC_THREAD( entry ); + sensitive << clk; + obj1 = 0; + obj2 = 0; + obj3 = 0; + obj4 = 0; + obj5 = 0; + } + + void entry(); +}; + +void proc1::entry() +{ + wait(); + while(true) { + obj1 = 7; + obj2 = 31; + obj3 = -1023; + obj4 = 2047; + obj5 = -1; + obj5 = ~(obj5 << 40); + wait(); + obj1 = 1; + obj2 = -2; + obj3 = 1024; + obj4 = -2048; + obj5 = -(obj5+1); + wait(); + } +} + + +int sc_main(int ac, char *av[]) +{ + sc_trace_file *tf; + sc_signal<bool> clock; + + proc1 P1("P1", clock); + + tf = sc_create_vcd_trace_file("test04"); + sc_trace(tf, P1.obj1, "Char"); + sc_trace(tf, P1.obj2, "Short"); + sc_trace(tf, P1.obj3, "Int"); + sc_trace(tf, P1.obj4, "Long"); + sc_trace(tf, P1.obj5, "Int64"); + sc_trace(tf, clock, "Clock"); + + clock.write(0); + sc_start(0, SC_NS); + for (int i = 0; i< 10; i++) { + clock.write(1); + sc_start(10, SC_NS); + clock.write(0); + sc_start(10, SC_NS); + } + sc_close_vcd_trace_file( tf ); + return 0; +} diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test05/golden/test05.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test05/golden/test05.vcd new file mode 100644 index 000000000..4e8be3b3b --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test05/golden/test05.vcd @@ -0,0 +1,181 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 4 aaaaa Char [3:0] $end +$var wire 12 aaaab Short [11:0] $end +$var wire 14 aaaac Int [13:0] $end +$var wire 14 aaaad Long [13:0] $end +$var wire 44 aaaae Int64 [43:0] $end +$var wire 1 aaaaf Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b111 aaaaa +b11111 aaaab +bx aaaac +b11111111111 aaaad +bx aaaae +1aaaaf +$end + +#10000 +b1 aaaaa +bx aaaab +b10000000000 aaaac +bx aaaad +b1110000000000000000000000000000000000000000 aaaae +0aaaaf + +#20000 +b111 aaaaa +b11111 aaaab +bx aaaac +b11111111111 aaaad +bx aaaae +1aaaaf + +#30000 +b1 aaaaa +bx aaaab +b10000000000 aaaac +bx aaaad +b1110000000000000000000000000000000000000000 aaaae +0aaaaf + +#40000 +b111 aaaaa +b11111 aaaab +bx aaaac +b11111111111 aaaad +bx aaaae +1aaaaf + +#50000 +b1 aaaaa +bx aaaab +b10000000000 aaaac +bx aaaad +b1110000000000000000000000000000000000000000 aaaae +0aaaaf + +#60000 +b111 aaaaa +b11111 aaaab +bx aaaac +b11111111111 aaaad +bx aaaae +1aaaaf + +#70000 +b1 aaaaa +bx aaaab +b10000000000 aaaac +bx aaaad +b1110000000000000000000000000000000000000000 aaaae +0aaaaf + +#80000 +b111 aaaaa +b11111 aaaab +bx aaaac +b11111111111 aaaad +bx aaaae +1aaaaf + +#90000 +b1 aaaaa +bx aaaab +b10000000000 aaaac +bx aaaad +b1110000000000000000000000000000000000000000 aaaae +0aaaaf + +#100000 +b111 aaaaa +b11111 aaaab +bx aaaac +b11111111111 aaaad +bx aaaae +1aaaaf + +#110000 +b1 aaaaa +bx aaaab +b10000000000 aaaac +bx aaaad +b1110000000000000000000000000000000000000000 aaaae +0aaaaf + +#120000 +b111 aaaaa +b11111 aaaab +bx aaaac +b11111111111 aaaad +bx aaaae +1aaaaf + +#130000 +b1 aaaaa +bx aaaab +b10000000000 aaaac +bx aaaad +b1110000000000000000000000000000000000000000 aaaae +0aaaaf + +#140000 +b111 aaaaa +b11111 aaaab +bx aaaac +b11111111111 aaaad +bx aaaae +1aaaaf + +#150000 +b1 aaaaa +bx aaaab +b10000000000 aaaac +bx aaaad +b1110000000000000000000000000000000000000000 aaaae +0aaaaf + +#160000 +b111 aaaaa +b11111 aaaab +bx aaaac +b11111111111 aaaad +bx aaaae +1aaaaf + +#170000 +b1 aaaaa +bx aaaab +b10000000000 aaaac +bx aaaad +b1110000000000000000000000000000000000000000 aaaae +0aaaaf + +#180000 +b111 aaaaa +b11111 aaaab +bx aaaac +b11111111111 aaaad +bx aaaae +1aaaaf + +#190000 +b1 aaaaa +bx aaaab +b10000000000 aaaac +bx aaaad +b1110000000000000000000000000000000000000000 aaaae +0aaaaf + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test05/test05.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test05/test05.cpp new file mode 100644 index 000000000..b0880c4c6 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test05/test05.cpp @@ -0,0 +1,115 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test05.cpp -- + + Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#include "systemc.h" + +SC_MODULE( proc1 ) +{ + SC_HAS_PROCESS( proc1 ); + + sc_in<bool> clk; + + char obj1; + short obj2; + int obj3; + long obj4; + int64 obj5; + + proc1( sc_module_name NAME, + sc_signal<bool>& CLK ) + { + clk(CLK); + SC_THREAD( entry ); + sensitive << clk; + obj1 = 0; + obj2 = 0; + obj3 = 0; + obj4 = 0; + obj5 = 0; + } + + void entry(); +}; + +void proc1::entry() +{ + wait(); + while(true) { + obj1 = 7; + obj2 = 31; + obj3 = -1023; + obj4 = 2047; + obj5 = -1; + obj5 = obj5 << 40; + wait(); + obj1 = 1; + obj2 = -2; + obj3 = 1024; + obj4 = -2048; + obj5 = 7; + obj5 = obj5 << 40; + wait(); + } +} + + +int sc_main(int ac, char *av[]) +{ + sc_trace_file *tf; + sc_signal<bool> clock; + + proc1 P1("P1", clock); + + tf = sc_create_vcd_trace_file("test05"); + sc_trace(tf, P1.obj1, "Char", 4); + sc_trace(tf, P1.obj2, "Short", 12); + sc_trace(tf, P1.obj3, "Int", 14); + sc_trace(tf, P1.obj4, "Long", 14); + sc_trace(tf, P1.obj5, "Int64", 44); + sc_trace(tf, clock, "Clock"); + + clock.write(0); + sc_start(0, SC_NS); + for (int i = 0; i< 10; i++) { + clock.write(1); + sc_start(10, SC_NS); + clock.write(0); + sc_start(10, SC_NS); + } + sc_close_vcd_trace_file( tf ); + return 0; +} diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test06/golden/test06.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test06/golden/test06.vcd new file mode 100644 index 000000000..f46546373 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test06/golden/test06.vcd @@ -0,0 +1,97 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var real 1 aaaaa Float $end +$var real 1 aaaab Double $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +r12.34500026702881 aaaaa +r-13.5678923 aaaab +$end + +#10000 +r-182634880 aaaaa +r1672357.298346 aaaab + +#20000 +r12.34500026702881 aaaaa +r-13.5678923 aaaab + +#30000 +r-182634880 aaaaa +r1672357.298346 aaaab + +#40000 +r12.34500026702881 aaaaa +r-13.5678923 aaaab + +#50000 +r-182634880 aaaaa +r1672357.298346 aaaab + +#60000 +r12.34500026702881 aaaaa +r-13.5678923 aaaab + +#70000 +r-182634880 aaaaa +r1672357.298346 aaaab + +#80000 +r12.34500026702881 aaaaa +r-13.5678923 aaaab + +#90000 +r-182634880 aaaaa +r1672357.298346 aaaab + +#100000 +r12.34500026702881 aaaaa +r-13.5678923 aaaab + +#110000 +r-182634880 aaaaa +r1672357.298346 aaaab + +#120000 +r12.34500026702881 aaaaa +r-13.5678923 aaaab + +#130000 +r-182634880 aaaaa +r1672357.298346 aaaab + +#140000 +r12.34500026702881 aaaaa +r-13.5678923 aaaab + +#150000 +r-182634880 aaaaa +r1672357.298346 aaaab + +#160000 +r12.34500026702881 aaaaa +r-13.5678923 aaaab + +#170000 +r-182634880 aaaaa +r1672357.298346 aaaab + +#180000 +r12.34500026702881 aaaaa +r-13.5678923 aaaab + +#190000 +r-182634880 aaaaa +r1672357.298346 aaaab + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test06/test06.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test06/test06.cpp new file mode 100644 index 000000000..a24951485 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test06/test06.cpp @@ -0,0 +1,97 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test06.cpp -- + + Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#include "systemc.h" + +SC_MODULE( proc1 ) +{ + SC_HAS_PROCESS( proc1 ); + + sc_in<bool> clk; + + float obj1; + double obj2; + + proc1( sc_module_name NAME, + sc_signal<bool>& CLK ) + { + clk(CLK); + SC_THREAD( entry ); + sensitive << clk; + obj1 = 0.0; + obj2 = 0.0; + } + + void entry(); +}; + +void proc1::entry() +{ + wait(); + while(true) { + obj1 = 12.345; + obj2 = -13.5678923; + wait(); + obj1 = -182634876.5659374; + obj2 = 1672357.298346; + wait(); + } +} + + +int sc_main(int ac, char *av[]) +{ + sc_trace_file *tf; + sc_signal<bool> clock; + + proc1 P1("P1", clock); + + tf = sc_create_vcd_trace_file("test06"); + sc_trace(tf, P1.obj1, "Float"); + sc_trace(tf, P1.obj2, "Double"); + + clock.write(0); + sc_start(0, SC_NS); + for (int i = 0; i< 10; i++) { + clock.write(1); + sc_start(10, SC_NS); + clock.write(0); + sc_start(10, SC_NS); + } + sc_close_vcd_trace_file( tf ); + return 0; +} diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test07/golden/test07.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test07/golden/test07.vcd new file mode 100644 index 000000000..0c2a3a022 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test07/golden/test07.vcd @@ -0,0 +1,139 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 4 aaaaa Signed [3:0] $end +$var wire 4 aaaab Unsigned [3:0] $end +$var wire 4 aaaac BV [3:0] $end +$var wire 4 aaaad SV [3:0] $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b11 aaaaa +b111 aaaab +b11 aaaac +b1100 aaaad +$end + +#10000 +b1101 aaaaa +b101 aaaab +b1111 aaaac +b1110 aaaad + +#20000 +b11 aaaaa +b111 aaaab +b11 aaaac +b1100 aaaad + +#30000 +b1101 aaaaa +b101 aaaab +b1111 aaaac +b1110 aaaad + +#40000 +b11 aaaaa +b111 aaaab +b11 aaaac +b1100 aaaad + +#50000 +b1101 aaaaa +b101 aaaab +b1111 aaaac +b1110 aaaad + +#60000 +b11 aaaaa +b111 aaaab +b11 aaaac +b1100 aaaad + +#70000 +b1101 aaaaa +b101 aaaab +b1111 aaaac +b1110 aaaad + +#80000 +b11 aaaaa +b111 aaaab +b11 aaaac +b1100 aaaad + +#90000 +b1101 aaaaa +b101 aaaab +b1111 aaaac +b1110 aaaad + +#100000 +b11 aaaaa +b111 aaaab +b11 aaaac +b1100 aaaad + +#110000 +b1101 aaaaa +b101 aaaab +b1111 aaaac +b1110 aaaad + +#120000 +b11 aaaaa +b111 aaaab +b11 aaaac +b1100 aaaad + +#130000 +b1101 aaaaa +b101 aaaab +b1111 aaaac +b1110 aaaad + +#140000 +b11 aaaaa +b111 aaaab +b11 aaaac +b1100 aaaad + +#150000 +b1101 aaaaa +b101 aaaab +b1111 aaaac +b1110 aaaad + +#160000 +b11 aaaaa +b111 aaaab +b11 aaaac +b1100 aaaad + +#170000 +b1101 aaaaa +b101 aaaab +b1111 aaaac +b1110 aaaad + +#180000 +b11 aaaaa +b111 aaaab +b11 aaaac +b1100 aaaad + +#190000 +b1101 aaaaa +b101 aaaab +b1111 aaaac +b1110 aaaad + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test07/test07.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test07/test07.cpp new file mode 100644 index 000000000..b0a73c6c4 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test07/test07.cpp @@ -0,0 +1,112 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test07.cpp -- + + Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#include "systemc.h" + +SC_MODULE( proc1 ) +{ + SC_HAS_PROCESS( proc1 ); + + sc_in<bool> clk; + sc_signal<sc_bv<4> >& bv; + sc_signal<sc_lv<4> >& sv; + + sc_signed obj1; + sc_unsigned obj2; + + proc1( sc_module_name NAME, + sc_signal<bool>& CLK, + sc_signal<sc_bv<4> >& BV, + sc_signal<sc_lv<4> >& SV ) + : bv(BV), sv(SV), obj1(4), obj2(4) + { + clk(CLK); + SC_THREAD( entry ); + sensitive << clk; + obj1 = 0; + obj2 = 0; + bv = "0000"; + sv = "0000"; + } + + void entry(); +}; + +void proc1::entry() +{ + wait(); + while(true) { + obj1 = 3; + obj2 = 7; + bv = "0011"; + sv = "1100"; + wait(); + obj1 = -3; + obj2 = 5; + bv = "1111"; + sv = "1110"; + wait(); + } +} + + +int sc_main(int ac, char *av[]) +{ + sc_trace_file *tf; + sc_signal<bool> clock; + sc_signal<sc_bv<4> > bv; + sc_signal<sc_lv<4> > sv; + + proc1 P1("P1", clock, bv, sv); + + tf = sc_create_vcd_trace_file("test07"); + sc_trace(tf, P1.obj1, "Signed"); + sc_trace(tf, P1.obj2, "Unsigned"); + sc_trace(tf, bv, "BV"); + sc_trace(tf, sv, "SV"); + + clock.write(0); + sc_start(0, SC_NS); + for (int i = 0; i< 10; i++) { + clock.write(1); + sc_start(10, SC_NS); + clock.write(0); + sc_start(10, SC_NS); + } + sc_close_vcd_trace_file( tf ); + return 0; +} diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test08/golden/test08.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test08/golden/test08.vcd new file mode 100644 index 000000000..89c44a8e3 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test08/golden/test08.vcd @@ -0,0 +1,160 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 1 aaaaa Clock $end +$var wire 32 aaaab Int [31:0] $end +$var wire 8 aaaac Char [7:0] $end +$var real 1 aaaad Float $end +$var wire 1 aaaae Logic $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae +$end + +#10000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#20000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#30000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#40000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#50000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#60000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#70000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#80000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#90000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#100000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#110000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#120000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#130000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#140000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#150000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#160000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#170000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#180000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#190000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test08/test08.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test08/test08.cpp new file mode 100644 index 000000000..5ca91070c --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test08/test08.cpp @@ -0,0 +1,116 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test08.cpp -- + + Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#include "systemc.h" + +SC_MODULE( proc1 ) +{ + SC_HAS_PROCESS( proc1 ); + + sc_in<bool> clk; + sc_signal<int>& Isig; + sc_signal<char>& Csig; + sc_signal<float>& Fsig; + sc_signal<sc_logic>& Lsig; + + proc1( sc_module_name NAME, + sc_signal<bool>& CLK, + sc_signal<int>& ISIG, + sc_signal<char>& CSIG, + sc_signal<float>& FSIG, + sc_signal<sc_logic>& LSIG ) + : Isig(ISIG), Csig(CSIG), Fsig(FSIG), Lsig(LSIG) + { + clk(CLK); + SC_THREAD( entry ); + sensitive << clk; + Isig = 0; + Csig = 0; + Fsig = 0.0; + Lsig = SC_LOGIC_0;//'0'; + } + + void entry(); +}; + +void proc1::entry() +{ + wait(); + while(true) { + Isig = 1023; + Csig = 15; + Fsig = -4; + Lsig = SC_LOGIC_X;//'x'; + wait(); + Isig = 10; + Csig = 8; + Fsig = 1000.23456; + Lsig = SC_LOGIC_Z;//'z'; + wait(); + } +} + + +int sc_main(int ac, char *av[]) +{ + sc_trace_file *tf; + sc_signal<bool> clock; + sc_signal<int> I; + sc_signal<char> C; + sc_signal<float> F; + sc_signal<sc_logic> L; + + proc1 P1("P1", clock, I, C, F, L); + + tf = sc_create_vcd_trace_file("test08"); + sc_trace(tf, clock, "Clock"); + sc_trace(tf, I, "Int", 32); + sc_trace(tf, C, "Char", 8); + sc_trace(tf, F, "Float"); + sc_trace(tf, L, "Logic"); + + clock.write(0); + sc_start(0, SC_NS); + for (int i = 0; i< 10; i++) { + clock.write(1); + sc_start(10, SC_NS); + clock.write(0); + sc_start(10, SC_NS); + } + sc_close_vcd_trace_file( tf ); + return 0; +} diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test09/golden/test09.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test09/golden/test09.vcd new file mode 100644 index 000000000..89c44a8e3 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test09/golden/test09.vcd @@ -0,0 +1,160 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 1 aaaaa Clock $end +$var wire 32 aaaab Int [31:0] $end +$var wire 8 aaaac Char [7:0] $end +$var real 1 aaaad Float $end +$var wire 1 aaaae Logic $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae +$end + +#10000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#20000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#30000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#40000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#50000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#60000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#70000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#80000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#90000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#100000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#110000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#120000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#130000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#140000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#150000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#160000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#170000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#180000 +1aaaaa +b1111111111 aaaab +b1111 aaaac +r-4 aaaad +xaaaae + +#190000 +0aaaaa +b1010 aaaab +b1000 aaaac +r1000.234558105469 aaaad +zaaaae + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test09/test09.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test09/test09.cpp new file mode 100644 index 000000000..2cf32898d --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test09/test09.cpp @@ -0,0 +1,118 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test09.cpp -- + + Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#include "systemc.h" + +SC_MODULE( proc1 ) +{ + SC_HAS_PROCESS( proc1 ); + + sc_in<bool> clk; + sc_signal<int>& Isig; + sc_signal<char>& Csig; + sc_signal<float>& Fsig; + sc_signal<sc_logic>& Lsig; + + proc1( sc_module_name NAME, + sc_signal<bool>& CLK, + sc_signal<int>& ISIG, + sc_signal<char>& CSIG, + sc_signal<float>& FSIG, + sc_signal<sc_logic>& LSIG ) + : Isig(ISIG), Csig(CSIG), Fsig(FSIG), Lsig(LSIG) + { + clk(CLK); + SC_THREAD( entry ); + sensitive << clk; + Isig = 0; + Csig = 0; + Fsig = 0.0; + Lsig = SC_LOGIC_0;//'0'; + } + + void entry(); +}; + +void proc1::entry() +{ + wait(); + while(true) { + Isig = 1023; + Csig = 15; + Fsig = -4; + Lsig = SC_LOGIC_X;//'x'; + wait(); + Isig = 10; + Csig = 8; + Fsig = 1000.23456; + Lsig = SC_LOGIC_Z;//'z'; + wait(); + } +} + + +int sc_main(int ac, char *av[]) +{ + sc_trace_file *tf; + sc_signal<bool> clock; + sc_signal<int> I; + sc_signal<char> C; + sc_signal<float> F; + sc_signal<sc_logic> L; + + proc1 P1("P1", clock, I, C, F, L); + + tf = sc_create_vcd_trace_file("test09"); + sc_trace(tf, clock, "Clock"); + sc_trace(tf, I, "Int"); + sc_trace(tf, C, "Char"); + sc_trace(tf, F, "Float"); + sc_trace(tf, L, "Logic"); + + clock.write(0); + sc_start(0, SC_NS); + for (int i = 0; i< 10; i++) { + clock.write(1); + sc_start(10, SC_NS); + clock.write(0); + sc_start(10, SC_NS); + } + + sc_close_vcd_trace_file( tf ); + + return 0; +} diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test10/golden/test10.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test10/golden/test10.vcd new file mode 100644 index 000000000..ade576b74 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test10/golden/test10.vcd @@ -0,0 +1,97 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 2 aaaaa Enum [1:0] $end +$var wire 1 aaaab Clock $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b0 aaaaa +1aaaab +$end + +#10000 +b1 aaaaa +0aaaab + +#20000 +b10 aaaaa +1aaaab + +#30000 +b0 aaaaa +0aaaab + +#40000 +b1 aaaaa +1aaaab + +#50000 +b10 aaaaa +0aaaab + +#60000 +b0 aaaaa +1aaaab + +#70000 +b1 aaaaa +0aaaab + +#80000 +b10 aaaaa +1aaaab + +#90000 +b0 aaaaa +0aaaab + +#100000 +b1 aaaaa +1aaaab + +#110000 +b10 aaaaa +0aaaab + +#120000 +b0 aaaaa +1aaaab + +#130000 +b1 aaaaa +0aaaab + +#140000 +b10 aaaaa +1aaaab + +#150000 +b0 aaaaa +0aaaab + +#160000 +b1 aaaaa +1aaaab + +#170000 +b10 aaaaa +0aaaab + +#180000 +b0 aaaaa +1aaaab + +#190000 +b1 aaaaa +0aaaab + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test10/test10.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test10/test10.cpp new file mode 100644 index 000000000..2d2688a34 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test10/test10.cpp @@ -0,0 +1,107 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test10.cpp -- + + Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#include "systemc.h" + +SC_MODULE( proc1 ) +{ + SC_HAS_PROCESS( proc1 ); + + sc_in<bool> clk; + + enum Ttype { + OK, + NOTOK, + SOSO + }; + + unsigned obj1; + + proc1( sc_module_name NAME, + sc_signal<bool>& CLK ) + { + clk(CLK); + SC_THREAD( entry ); + sensitive << clk; + obj1 = OK; + } + + void entry(); +}; + +void proc1::entry() +{ + wait(); + while(true) { + obj1 = OK; + wait(); + obj1 = NOTOK; + wait(); + obj1 = SOSO; + wait(); + } +} + + +int sc_main(int ac, char *av[]) +{ + sc_trace_file *tf; + sc_signal<bool> clock; + + char *enum_literals[4]; + enum_literals[0] = "OK"; + enum_literals[1] = "NOTOK"; + enum_literals[2] = "SOSO"; + enum_literals[3] = 0; + + proc1 P1("P1", clock); + + tf = sc_create_vcd_trace_file("test10"); + sc_trace(tf, P1.obj1, "Enum", (const char **) enum_literals); + sc_trace(tf, clock, "Clock"); + + clock.write(0); + sc_start(0, SC_NS); + for (int i = 0; i< 10; i++) { + clock.write(1); + sc_start(10, SC_NS); + clock.write(0); + sc_start(10, SC_NS); + } + sc_close_vcd_trace_file( tf ); + return 0; +} diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test12/golden/test12.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test12/golden/test12.vcd new file mode 100644 index 000000000..00ddc9460 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test12/golden/test12.vcd @@ -0,0 +1,139 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 10 aaaaa Signed [9:0] $end +$var wire 10 aaaab Unsigned [9:0] $end +$var wire 10 aaaac BV [9:0] $end +$var wire 10 aaaad SV [9:0] $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b11 aaaaa +b111 aaaab +b11 aaaac +b111 aaaad +$end + +#10000 +b1111111101 aaaaa +b101 aaaab +b1111111101 aaaac +b101 aaaad + +#20000 +b11 aaaaa +b111 aaaab +b11 aaaac +b111 aaaad + +#30000 +b1111111101 aaaaa +b101 aaaab +b1111111101 aaaac +b101 aaaad + +#40000 +b11 aaaaa +b111 aaaab +b11 aaaac +b111 aaaad + +#50000 +b1111111101 aaaaa +b101 aaaab +b1111111101 aaaac +b101 aaaad + +#60000 +b11 aaaaa +b111 aaaab +b11 aaaac +b111 aaaad + +#70000 +b1111111101 aaaaa +b101 aaaab +b1111111101 aaaac +b101 aaaad + +#80000 +b11 aaaaa +b111 aaaab +b11 aaaac +b111 aaaad + +#90000 +b1111111101 aaaaa +b101 aaaab +b1111111101 aaaac +b101 aaaad + +#100000 +b11 aaaaa +b111 aaaab +b11 aaaac +b111 aaaad + +#110000 +b1111111101 aaaaa +b101 aaaab +b1111111101 aaaac +b101 aaaad + +#120000 +b11 aaaaa +b111 aaaab +b11 aaaac +b111 aaaad + +#130000 +b1111111101 aaaaa +b101 aaaab +b1111111101 aaaac +b101 aaaad + +#140000 +b11 aaaaa +b111 aaaab +b11 aaaac +b111 aaaad + +#150000 +b1111111101 aaaaa +b101 aaaab +b1111111101 aaaac +b101 aaaad + +#160000 +b11 aaaaa +b111 aaaab +b11 aaaac +b111 aaaad + +#170000 +b1111111101 aaaaa +b101 aaaab +b1111111101 aaaac +b101 aaaad + +#180000 +b11 aaaaa +b111 aaaab +b11 aaaac +b111 aaaad + +#190000 +b1111111101 aaaaa +b101 aaaab +b1111111101 aaaac +b101 aaaad + +#200000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test12/test12.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test12/test12.cpp new file mode 100644 index 000000000..d4f19a26e --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test12/test12.cpp @@ -0,0 +1,117 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test12.cpp -- + + Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#include "systemc.h" + +SC_MODULE( proc1 ) +{ + SC_HAS_PROCESS( proc1 ); + + sc_in<bool> clk; + sc_signal<sc_int<10> >& bv; + sc_signal<sc_uint<10> >& sv; + + sc_int<10> obj1; + sc_uint<10> obj2; + + proc1( sc_module_name NAME, + sc_signal<bool>& CLK, + sc_signal<sc_int<10> >& BV, + sc_signal<sc_uint<10> >& SV ) + : bv(BV), sv(SV) + { + clk(CLK); + SC_THREAD( entry ); + sensitive << clk; + obj1 = 0; + obj2 = 0; + bv.write(0); + sv.write(0); + } + + void entry(); +}; + +void proc1::entry() +{ + wait(); + while(true) { + obj1 = 3; + obj2 = 7; + bv = obj1; + sv = obj2; + wait(); + obj1 = -3; + obj2 = 5; + bv = obj1; + sv = obj2; + wait(); + } +} + + +int sc_main(int ac, char *av[]) +{ + sc_trace_file *tf; + sc_signal<bool> clock; + sc_signal<sc_int<10> > bv; + sc_signal<sc_uint<10> > sv; + + proc1 P1("P1", clock, bv, sv); + + tf = sc_create_vcd_trace_file("test12"); + sc_trace(tf, P1.obj1, "Signed"); + sc_trace(tf, P1.obj2, "Unsigned"); + sc_trace(tf, bv, "BV"); + sc_trace(tf, sv, "SV"); + + clock.write(0); + sc_start(0, SC_NS); + for (int i = 0; i< 10; i++) { +cerr << sc_time_stamp() << endl; + clock.write(1); + sc_start(10, SC_NS); +cerr << sc_time_stamp() << endl; + clock.write(0); + sc_start(10, SC_NS); +cerr << sc_time_stamp() << endl; + } + + sc_close_vcd_trace_file( tf ); + + return 0; +} diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test13/golden/test13.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test13/golden/test13.vcd new file mode 100644 index 000000000..f1b55ff3a --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test13/golden/test13.vcd @@ -0,0 +1,32 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 1 aaaaa clk $end +$scope module mod $end +$var wire 37 aaaab a [36:0] $end +$upscope $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +1aaaaa +b0 aaaab +$end + +#25000 +0aaaaa + +#50000 +1aaaaa +b1100 aaaab + +#75000 +0aaaaa + diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test13/test13.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test13/test13.cpp new file mode 100644 index 000000000..1c3333c78 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test13/test13.cpp @@ -0,0 +1,53 @@ +#include <systemc.h> +sc_trace_file* sc_tf; + +class Mod : public sc_module +{ + public: + sc_in_clk clk; + sc_in<sc_uint<37> > a; + + SC_HAS_PROCESS(Mod); + void foo() + { + cout << sc_time_stamp() << "\n"; + cout << " a = " << a << "\n"; + cout << "\n"; + + return; + + } // foo() + + Mod(const sc_module_name& name) : sc_module(name), a("a") + { + SC_METHOD(foo); + sensitive << clk.pos(); + dont_initialize(); + + sc_trace(sc_tf, a, a.name()); + } + +}; // class Mod + + +int sc_main(int argc, char* argv[]) +{ + sc_clock clk("clk", 50, SC_NS, 0.5, 0, SC_NS); + sc_signal<sc_uint<37> > a; + + sc_tf = sc_create_vcd_trace_file("test13"); + + Mod mod("mod"); + + mod.clk(clk); + mod.a(a); + + sc_trace(sc_tf, clk, clk.name()); + + sc_start(50, SC_NS); + a = 12; + sc_start(50, SC_NS); + + return 0; + +} // sc_main() diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test14/golden/test14.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test14/golden/test14.vcd new file mode 100644 index 000000000..78a2f6ebb --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test14/golden/test14.vcd @@ -0,0 +1,35 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var wire 1 aaaaa clk $end +$scope module mod $end +$var wire 37 aaaab a [36:0] $end +$var wire 1 aaaac port_1 $end +$upscope $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +1aaaaa +b0 aaaab +0aaaac +$end + +#25000 +0aaaaa + +#50000 +1aaaaa +b1100 aaaab +1aaaac + +#75000 +0aaaaa + diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test14/test14.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test14/test14.cpp new file mode 100644 index 000000000..a53fdc6e8 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test14/test14.cpp @@ -0,0 +1,65 @@ + +#include <systemc.h> + +sc_trace_file* sc_tf; + +class Mod : public sc_module +{ + public: + + sc_in_clk clk; + + sc_in<sc_uint<37> > a; + sc_inout<bool > b; + + + + SC_HAS_PROCESS(Mod); + + void foo() + { + cout << sc_time_stamp() << "\n"; + cout << " a = " << a << " b = " << b << "\n"; + cout << "\n"; + return; + } // foo() + + Mod(const sc_module_name& name) : sc_module(name), a("a") + { + SC_METHOD(foo); + sensitive << clk.pos(); + dont_initialize(); + } + + void start_of_simulation() { + + sc_trace(sc_tf, a, a.name()); + sc_trace(sc_tf, b, b.name()); + } + +}; // class Mod + + + + + +int sc_main(int argc, char* argv[]) + +{ + sc_clock clk("clk", 50, SC_NS, 0.5, 0, SC_NS); + sc_signal<sc_uint<37> > a; + sc_signal<bool> b; + sc_tf = sc_create_vcd_trace_file("test14"); + Mod mod("mod"); + mod.clk(clk); + mod.a(a); + mod.b(b); + sc_trace(sc_tf, clk, clk.name()); + sc_start(50, SC_NS); + a = 12; + b = true; + sc_start(50, SC_NS); + return 0; +} // sc_main() + + diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test15/golden/test15.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test15/golden/test15.vcd new file mode 100644 index 000000000..c6c94f7b7 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test15/golden/test15.vcd @@ -0,0 +1,44 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$scope module test_top $end +$var wire 32 aaaaa sig [31:0] $end +$upscope $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +b10 aaaaa +$end + +#1 +b11 aaaaa + +#2 +b100 aaaaa + +#1002 +b111 aaaaa + +#2002 +b1000 aaaaa + +#3002 +b1001 aaaaa + +#3003 +b1010 aaaaa + +#3005 +b1011 aaaaa + +#4005 +b1100 aaaaa + diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test15/test15.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test15/test15.cpp new file mode 100644 index 000000000..979572423 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test15/test15.cpp @@ -0,0 +1,92 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test15.cpp -- test delta cycle tracing + + Original Author: Romain I Popov, Intel Corporation, 2017-05-29 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#include <systemc.h> + +SC_MODULE(trace_delta_test) +{ + sc_signal <int> sig; + sc_inout<int > iport; + + SC_CTOR(trace_delta_test) + : sig("sig",0) + { + iport.bind(sig); + iport.initialize(1); + SC_THREAD(test_thread); + } + + void test_thread() { + cout << "initial sig value is " << sig.read() << endl; + sig = 2; + wait(SC_ZERO_TIME); + sig = 3; + wait(SC_ZERO_TIME); + sig = 4; + wait(1, SC_PS); + sig = 5; // This won't be shown on delta-cycle enabled trace + wait(1, SC_PS); + sig = 6; // This won't be shown on delta-cycle enabled trace + wait(1, SC_NS); + sig = 7; + wait(1, SC_NS); + sig = 8; + wait(1, SC_NS); + sig = 9; + wait(SC_ZERO_TIME); + sig = 10; + wait(3, SC_PS); + sig = 11; // Ok: 3ps > 2ps delta cycle shift + wait(1, SC_NS); + sig = 12; + + cout << "stop at " << sc_time_stamp() << endl; + sc_stop(); + } + +}; + + +int sc_main(int argc, char **argv) +{ + trace_delta_test test_top("test_top"); + sc_trace_file* tf = sc_create_vcd_trace_file("test15"); + sc_trace_delta_cycles(tf,true); + sc_trace(tf, test_top.sig, test_top.sig.name()); + sc_start(); + return 0; +} diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test16/golden/test16.vcd b/src/systemc/tests/systemc/tracing/vcd_trace/test16/golden/test16.vcd new file mode 100644 index 000000000..9e5cd34d7 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test16/golden/test16.vcd @@ -0,0 +1,51 @@ + +$timescale + 1 ps +$end + +$scope module SystemC $end +$var event 1 aaaaa event $end +$var time 64 aaaab time [63:0] $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars + +b0 aaaab +$end + +#1000 +1aaaaa +b1111101000 aaaab + +#2000 +1aaaaa +b11111010000 aaaab + +#3000 +b101110111000 aaaab + +#4000 +1aaaaa +b111110100000 aaaab + +#5000 +1aaaaa +b1001110001000 aaaab + +#6000 +1aaaaa +b1011101110000 aaaab + +#7000 +b1101101011000 aaaab + +#8000 +1aaaaa +b1111101000000 aaaab + +#9000 diff --git a/src/systemc/tests/systemc/tracing/vcd_trace/test16/test16.cpp b/src/systemc/tests/systemc/tracing/vcd_trace/test16/test16.cpp new file mode 100644 index 000000000..40ee45d20 --- /dev/null +++ b/src/systemc/tests/systemc/tracing/vcd_trace/test16/test16.cpp @@ -0,0 +1,101 @@ +/***************************************************************************** + + Licensed to Accellera Systems Initiative Inc. (Accellera) under one or + more contributor license agreements. See the NOTICE file distributed + with this work for additional information regarding copyright ownership. + Accellera licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + + *****************************************************************************/ + +/***************************************************************************** + + test15.cpp -- test event/time tracing + + Original Author: Philipp A Hartmann, Intel Corporation, 2017-08-29 + + *****************************************************************************/ + +/***************************************************************************** + + MODIFICATION LOG - modifiers, enter your name, affiliation, date and + changes you are making here. + + Name, Affiliation, Date: + Description of Modification: + + *****************************************************************************/ + +#include <systemc> +using namespace sc_core; + +SC_MODULE(module) +{ + SC_CTOR(module) + { + SC_THREAD(driver); + SC_METHOD(consumer); + sensitive << event; + dont_initialize(); + } + + void driver() + { + wait(1, SC_NS); + event.notify(); // t == 1ns + + wait(1, SC_NS); + event.notify(SC_ZERO_TIME); // t == 2ns + + wait(1, SC_NS); + event.notify(1, SC_NS); // t == 4ns + time = sc_time_stamp(); + + wait(2, SC_NS); + event.notify(); // t == 5ns + + wait(1, SC_NS); + event.notify(SC_ZERO_TIME); // t == 6ns + + wait(1, SC_NS); + event.notify(1, SC_NS); // t == 8ns + time = sc_time_stamp(); + + wait(2, SC_NS); + } + + void consumer() + { + time = sc_time_stamp(); + } + + sc_event event; + sc_time time; +}; + +int sc_main(int argc, char* argv[]) +{ + sc_trace_file* tf = sc_create_vcd_trace_file("test16"); + + module m("m"); + + sc_trace(tf, m.event, "event"); + sc_trace(tf, m.time, "time"); + + sc_start(); + sc_stop(); + + sc_close_vcd_trace_file(tf); + return 0; +} + + |