Skip to content

broccolimicro/prspice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prspice

This tool puts together all the supporting files necessary to do a digital and analog cosimulation for asynchronous circuits. The digital simulation is handled by prsim and the analog is handled by hsim. These two simulators talk to eachother through vcs.

The required flags may are documented with the help command.

prspice --help
usage: prspice -p "process_name" -i "instance_name" -C "netgen config" "act_file" "script_file"

To run the example, execute the following. There is also a Makefile available.

prspice -p "wchb<>" -i "dut" -C st28 wchb_test.act prsim.rc

Other commands are available. Sources may be specified with the -s flag, the -B flag is passed directly to netgen, and the -o flag allows you to specify the name of the output test directory.

prspice -B -C st28 -p 'wchb<>' -i 'dut' -s 'g.Vdd=1.0v;g.GND=0.0v;gwrap.Vdd=1.0v;gwrap.GND=0.0v' wchb_test.act prsim.rc -o spice

Overall, five files are copied from the support directory and seven files are generated.

  • cosim.cfg - Copied from $PRSPICE_INSTALL/lib/prspice. Tells vcs the name of the cell that interfaces verilog and spice.
  • dbase.dat - Internal to prspice, can be deleted or ignored.
  • dut.spi - The spice of the circuit being simulated, generated with netgen. This is done with the process name provided by the -p flag.
  • env.prs - The production rules remaining in the test after excluding the spiced process. This is done with a grep for the instance name provided by the -i flag.
  • hsim.xprs - Required by tlint, mapping the raw signal names in the production rules to the mangled spice names.
  • libALINT.so - Required by tlint, copied from $PRSPICE_INSTALL/lib/prspice
  • libprsim.a - Required by prsim, copied from $PRSPICE_INSTALL/lib
  • libvlsilib.a - Required by prsim, copied from $PRSPICE_INSTALL/lib
  • Makefile - Generated by prspice to pass the necessary flags to vcs
  • test.spi - Appended from $PRSPICE_INSTALL/lib/prspice. Top level spice file, contains all of the simulation parameters for hsim.
  • test.v - Generated by prspice. Top level verilog file, links prsim to spice through vcs.
  • vpi.o - Copied from $PRSPICE_INSTALL/lib/prspice. Required by prsim and vcs to link the two simulators.