Difference between revisions of "ATC"

From Vlsiwiki
Jump to: navigation, search
(Automatic Testbench Creator (ATC))
Line 46: Line 46:
 
#dut_ttb.cpp - VPI Testbench backend, communication with VCS... (Autogenerated every time your run rake)<br>
 
#dut_ttb.cpp - VPI Testbench backend, communication with VCS... (Autogenerated every time your run rake)<br>
 
#dut_ttb.tab - VCS file that correlates verilog functions with C++ VPI functions (Autogenerated every time your run rake, deprecated)<br></p>
 
#dut_ttb.tab - VCS file that correlates verilog functions with C++ VPI functions (Autogenerated every time your run rake, deprecated)<br></p>
 +
</p>
 +
 +
 +
<br><br><br>
 +
<H2>running the initially created tb</H2><br>
 +
 +
 +
<br>
 +
<nowiki>[agolubev@mascd2 atcexample]$rake test:atcexample_tb<br>
 +
(in /mada/users/agolubev/scoore)<br>
 +
cd /mada/users/agolubev/scoore/projects/scoore/atcexample<br>
 +
 +
Warning-[ACC_CLI_ON] ACC/CLI capabilities enabled<br>
 +
  ACC/CLI capabilities have been enabled for the entire design. For faster<br>
 +
  performance enable module specific capability in pli.tab file<br>
 +
 +
50 modules and 0 UDP read.<br>
 +
        However, due to incremental compilation, no re-compilation is necessary.<br>
 +
g++ -pipe -Wno-write-strings -I/mada/software/synopsys/vcs//include -I/mada/users/agolubev/scoore/projects/scoore/synthesis/rtl <br>
 +
-I/mada/users/agolubev/scoore/storage/rtl -I/mada/users/agolubev/scoore/memcell/rtl -I/mada/users/agolubev/scoore/projects/scoore/common/rtl<br>
 +
-I/mada/users/agolubev/scoore/projects/scoore/atcexample/rtl -O -I/mada/software/synopsys/vcs/include -c ../tests/atcexample_tb.cpp<br>
 +
g++ -pipe -Wno-write-strings -I/mada/software/synopsys/vcs//include -I/mada/users/agolubev/scoore/projects/scoore/synthesis/rtl <br>
 +
-I/mada/users/agolubev/scoore/storage/rtl -I/mada/users/agolubev/scoore/memcell/rtl -I/mada/users/agolubev/scoore/projects/scoore/common/rtl<br>
 +
-I/mada/users/agolubev/scoore/projects/scoore/atcexample/rtl -O -I/mada/software/synopsys/vcs/include -c ../tests/atcexample_ttb.cpp<br>
 +
../simv up to date<br>
 +
full clock set to 10ns<br>
 +
                        Testbench Seeded with 1247602844<br>
 +
<br>
 +
@D atcexample_tb check(): tb_cycle[0]<br>
 +
@D atcexample_tb check(): tb_cycle[1]<br>
 +
@D atcexample_tb check(): tb_cycle[2]<br>
 +
@D atcexample_tb check(): tb_cycle[3]<br>
 +
@D atcexample_tb check(): tb_cycle[4]<br>
 +
@D atcexample_tb check(): tb_cycle[5]<br>
 +
@D atcexample_tb check(): tb_cycle[6]<br>
 +
@D atcexample_tb check(): tb_cycle[7]<br>
 +
@D atcexample_tb check(): tb_cycle[8]<br>
 +
@D atcexample_tb check(): tb_cycle[9]<br>
 +
<br>
 +
10 Clock Cycles Total atcexample_tb FINISHED<br>
 +
<br><br></nowiki>
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
 
WORK IN PROGRESS
 
WORK IN PROGRESS

Revision as of 20:25, 14 July 2009

Automatic Testbench Creator (ATC)




The ATC is a VPI testbench creator, it processes a verilog topfile, which is the device under test (DUT).
By processing the DUT, the ATC creates an object with inputs and outputs which are exactly the same as the DUT.

aunit.v

module alu_add(input int data1,
 input int data2,
 output int out);
   always_comb begin
      out = data1 + data2;
   end
end module


The ATC created testbench will give access to data1, data2 and out, which is the complete interface of aunit.v

==Implementation:==
The ATC is integrated into rake. To use it, edit the xml file in your top directory of the module.

  • In the testbench xml tag, add the ttb attribute, and set it to the name of your DUT.
    This assumes that the dut.v file is relative to rtl/dut.v, and the output of the ATC will be to tests/


  • ce.xml (Excerpt taken)

<testbench base="salu_tb" suite="vcs" ttb="salu.v">
   <verilog>
     tests/salu_tb.v
   </verilog>
   <source>
     tests/salu_tb.cpp
   </source>
   <tab>tests/salu_tb.tab</tab>
 </testbench>

  • This will create the complete interface for your testbench int the tests/ directory

  1. dut_tb.v - The verilog testbench, VCS will run this (Autogenerated every time your run rake)
  2. dut_tb.cpp - Your VPI testbench, C++ (Autogenerated only if file doesn't exist)
  3. dut_tb.h - Any vars / stuff you need for your tb (Autogenerated only if file doesn't exist)
  4. dut_ttb.h - VPI definitions, defines object that you use to communicate to ports of DUT (Autogenerated every time your run rake)
  5. dut_ttb.cpp - VPI Testbench backend, communication with VCS... (Autogenerated every time your run rake)
  6. dut_ttb.tab - VCS file that correlates verilog functions with C++ VPI functions (Autogenerated every time your run rake, deprecated)

</p>


running the initially created tb




[agolubev@mascd2 atcexample]$rake test:atcexample_tb<br> (in /mada/users/agolubev/scoore)<br> cd /mada/users/agolubev/scoore/projects/scoore/atcexample<br> Warning-[ACC_CLI_ON] ACC/CLI capabilities enabled<br> ACC/CLI capabilities have been enabled for the entire design. For faster<br> performance enable module specific capability in pli.tab file<br> 50 modules and 0 UDP read.<br> However, due to incremental compilation, no re-compilation is necessary.<br> g++ -pipe -Wno-write-strings -I/mada/software/synopsys/vcs//include -I/mada/users/agolubev/scoore/projects/scoore/synthesis/rtl <br> -I/mada/users/agolubev/scoore/storage/rtl -I/mada/users/agolubev/scoore/memcell/rtl -I/mada/users/agolubev/scoore/projects/scoore/common/rtl<br> -I/mada/users/agolubev/scoore/projects/scoore/atcexample/rtl -O -I/mada/software/synopsys/vcs/include -c ../tests/atcexample_tb.cpp<br> g++ -pipe -Wno-write-strings -I/mada/software/synopsys/vcs//include -I/mada/users/agolubev/scoore/projects/scoore/synthesis/rtl <br> -I/mada/users/agolubev/scoore/storage/rtl -I/mada/users/agolubev/scoore/memcell/rtl -I/mada/users/agolubev/scoore/projects/scoore/common/rtl<br> -I/mada/users/agolubev/scoore/projects/scoore/atcexample/rtl -O -I/mada/software/synopsys/vcs/include -c ../tests/atcexample_ttb.cpp<br> ../simv up to date<br> full clock set to 10ns<br> Testbench Seeded with 1247602844<br> <br> @D atcexample_tb check(): tb_cycle[0]<br> @D atcexample_tb check(): tb_cycle[1]<br> @D atcexample_tb check(): tb_cycle[2]<br> @D atcexample_tb check(): tb_cycle[3]<br> @D atcexample_tb check(): tb_cycle[4]<br> @D atcexample_tb check(): tb_cycle[5]<br> @D atcexample_tb check(): tb_cycle[6]<br> @D atcexample_tb check(): tb_cycle[7]<br> @D atcexample_tb check(): tb_cycle[8]<br> @D atcexample_tb check(): tb_cycle[9]<br> <br> 10 Clock Cycles Total atcexample_tb FINISHED<br> <br><br>







WORK IN PROGRESS