Changes between Version 6 and Version 7 of EricsVivadoNotes


Ignore:
Timestamp:
Mar 12, 2019, 12:59:57 PM (5 years ago)
Author:
Eric Hazen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EricsVivadoNotes

    v6 v7  
    1111  xelab -debug typical pulser -s pulser_sim
    1212  xsim --gui pulser_sim -t init.tcl
     13}}}
     14
     15Omit the {{{--gui}}} and end the tcl script with {{{quit}}} to run in batch mode.
     16Here is a simple example, to test a 4x4 multiplier with inputs (a,b) and output p:
     17
     18{{{
     19puts "Starting multiplier test"
     20set errz 0
     21for {set i 0} {$i < 16} {incr i} {
     22    for {set j 0} {$j < 16} {incr j} {
     23        add_force a -radix dec $i
     24        add_force b -radix dec $j
     25        run 10
     26        set calc_p [expr {$i * $j}]
     27        set sim_p [get_value -radix unsigned p]
     28        if {$calc_p != $sim_p} {
     29            puts "ERROR: Calculated: $calc_p simulated: $sim_p"
     30            incr errz
     31        }
     32    }
     33}
     34puts "$errz total errors"
     35quit
    1336}}}
    1437