generate_test.rb

Path: bin/generate_test.rb
Last Update: Wed Dec 27 22:20:28 PST 2006

Generates Ruby-VPI tests from Verilog 2001 module declarations.

  • The standard input stream is read if no input files are specified.
  • The first input signal in a module’s declaration is assumed to be the clocking signal.

Progress indicators

module:A Verilog module has been identified.
create:A file is being created because it does not exist.
skip:A file is being skipped because it is already up to date.
update:A file will be updated because it is out of date. A text merging tool (see MERGER) will be launched to transfer content from the old file (*.old) and the new file (*.new) to the out of date file. If a text merging tool is not specified, then you will have to do the merging by hand.

Environment variables

MERGER:A command that invokes a text merging tool with three arguments: (1) old file, (2) new file, (3) output file. The tool’s output should be written to the output file.

Required files

ruby-vpi/verilog_parser   fileutils   digest/md5   ruby-vpi/erb   optparse   ruby-vpi/rdoc  

Constants

VERILOG_BENCH_TEMPLATE = Template.new('bench.v')   obtain templates for output generation
RUBY_BENCH_TEMPLATE = Template.new('bench.rb')
DESIGN_TEMPLATE = Template.new('design.rb')
PROTO_TEMPLATE = Template.new('proto.rb')
SPEC_TEMPLATE = Template.new('spec.rb')
RUNNER_TEMPLATE = Template.new('runner.rake')

[Validate]