Changeset 84 for trunk/MultiChannelUSB/oscilloscope.v
- Timestamp:
- Dec 21, 2009, 5:09:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MultiChannelUSB/oscilloscope.v
r72 r84 11 11 // signal declaration 12 12 reg [3:0] state_reg, state_next; 13 reg flag_reg, flag_next;14 13 reg wren_reg, wren_next; 15 14 reg [9:0] addr_reg, addr_next; … … 21 20 22 21 wire [15:0] q_wire; 23 24 wire [15:0] data_wire;25 26 assign data_wire = (flag_reg) ? data : data_reg;27 22 28 23 altsyncram #( … … 38 33 .operation_mode("DUAL_PORT"), 39 34 .outdata_aclr_b("NONE"), 40 .outdata_reg_b(" UNREGISTERED"),35 .outdata_reg_b("CLOCK0"), 41 36 .power_up_uninitialized("FALSE"), 42 37 .read_during_write_mode_mixed_ports("OLD_DATA"), … … 50 45 .address_a(addr_reg), 51 46 .address_b(address), 52 .data_a(data_ wire),47 .data_a(data_reg), 53 48 .q_b(q_wire), 54 49 .aclr0(1'b0), … … 76 71 begin 77 72 state_reg <= 4'b1; 78 flag_reg <= 1'b0;79 73 wren_reg <= 1'b1; 80 74 addr_reg <= 10'd0; … … 87 81 begin 88 82 state_reg <= state_next; 89 flag_reg <= flag_next;90 83 wren_reg <= wren_next; 91 84 addr_reg <= addr_next; … … 100 93 begin 101 94 state_next = state_reg; 102 flag_next = flag_reg;103 95 wren_next = wren_reg; 104 96 addr_next = addr_reg; … … 113 105 // nothing to do 114 106 state_next = 4'b0; 115 flag_next = 1'b0;116 107 wren_next = 1'b0; 117 108 addr_next = 10'd0; … … 125 116 if (&addr_reg) 126 117 begin 127 flag_next = 1'b1;128 118 wren_next = 1'b0; 129 119 state_next = 4'd2; … … 140 130 begin 141 131 wren_next = 1'b1; 132 data_next = data; 142 133 state_next = 4'd3; 143 134 end … … 152 143 if (&counter_reg) 153 144 begin 154 flag_next = 1'b0;155 145 state_next = 4'd0; 156 146 end … … 177 167 begin 178 168 state_next = 4'b0; 179 flag_next = 1'b0;180 169 wren_next = 1'b0; 181 170 addr_next = 10'd0;
Note:
See TracChangeset
for help on using the changeset viewer.