[Simh] Is there an assertion check for memory content ?

Walter F.J. Mueller W.F.J.Mueller at gsi.de
Tue Oct 17 13:23:07 EDT 2006

J. David Bryan wrote:
> If the machine has memory address and memory contents registers, then 
> ASSERT can be used to verify memory values.  I am  not familiar with the 
> PDP-11, but for the HP 2100 simulator, the M (memory address) and T (memory 
> contents) registers can be used as in this example:
>   deposit M 126
>   assert T=13
> This would verify that location 126 contained the value 13.  Perhaps the 
> PDP-11 has similar registers?

Dear David,

the PDP11 doesn't have the equivalent of such registers. However, I solved
my problem conceptually in the following way:

 - the test benches I want to run on simh are generated from other sources,
   essentially lists of register and memory deposits, step or go commands,
   and register and memory examines with an expected value.

 - this generator now creates for example in case mem(03710) is to contain 033

       echo #EXPCT: 000033
       exa 003710

 - the simh output is run through a filter, picking out the #EXPCT: lines,
   checking the given value with the examine result in the next line, and
   writing this into a report.

 - in the end, simh runs in a pipe like (x.tbdat my test bench source file):

     tbdat2simh x.tbdat | simh | simh2report

				Thanks and with best regards,


More information about the Simh mailing list