OpenCores
URL https://opencores.org/ocsvn/dmt_tx/dmt_tx/trunk

Subversion Repositories dmt_tx

[/] [dmt_tx/] [trunk/] [myhdl/] [test/] [test_const_encoder.py] - Diff between revs 28 and 29

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 28 Rev 29
Line 44... Line 44...
          yield clk.negedge
          yield clk.negedge
          reset.next = 1
          reset.next = 1
          yield clk.negedge
          yield clk.negedge
          reset.next = 0
          reset.next = 0
 
 
          size = 5
 
 
          for size in [4, 5]:
 
              #print
 
              #print 'Testing const_size %d'%size
 
              #print
          const_size_i.next = size
          const_size_i.next = size
 
 
 
              yield clk.negedge
 
 
          for i in range(2**size):
          for i in range(2**size):
            data_i.next = i
            data_i.next = i
            wen_i.next = 1
            wen_i.next = 1
            yield clk.negedge
            yield clk.negedge
            wen_i.next = 0
            wen_i.next = 0
 
 
 
              yield clk.negedge
 
 
 
          yield clk.negedge
 
          raise StopSimulation
 
 
 
 
        @instance
        @instance
        def verify():
        def verify():
 
 
          expb2XL = [1, 1, -1, -1]
          expb2XL = [1, 1, -1, -1]
Line 69... Line 80...
              5, 5, -5, -5, 1,  1, 3,  3, -3, -3, -1, -1,  5,  5, -5, -5]
              5, 5, -5, -5, 1,  1, 3,  3, -3, -3, -1, -1,  5,  5, -5, -5]
          expb5YL = [1, 3, 1, 3, -3, -1, -3, -1,  1,  3,  1,  3, -3, -1, -3, -1,
          expb5YL = [1, 3, 1, 3, -3, -1, -3, -1,  1,  3,  1,  3, -3, -1, -3, -1,
              1, 3,  1,  3, 5, -5, 5, -5,  5, -5,  5, -5, -3, -1, -3, -1]
              1, 3,  1,  3, 5, -5, 5, -5,  5, -5,  5, -5, -3, -1, -3, -1]
 
 
 
 
 
          while True:
 
 
          expXL = []
          expXL = []
          expYL = []
          expYL = []
 
 
          yield data_valid_o.posedge
          yield data_valid_o.posedge
 
 
Line 103... Line 116...
            if expX != x_o:
            if expX != x_o:
              tc.fail("%d != x_o: %d at %d"%(expX, x_o, now()))
              tc.fail("%d != x_o: %d at %d"%(expX, x_o, now()))
            if expYL[j] != y_o:
            if expYL[j] != y_o:
              tc.fail("%d != y_o: %d at %d"%(expYL[j], y_o, now()))
              tc.fail("%d != y_o: %d at %d"%(expYL[j], y_o, now()))
 
 
          raise StopSimulation
              #raise StopSimulation
 
 
        return instances()
        return instances()
 
 
 
 
      #####################################
      #####################################

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.