Changeset 180 for trunk/3DEES/amplitude.v
- Timestamp:
- Jan 15, 2014, 1:30:27 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/3DEES/amplitude.v
r178 r180 19 19 reg [width-1:0] inp_data_reg [1:0], inp_data_next [1:0]; 20 20 21 wire 21 wire [1:0] int_comp_wire; 22 22 reg int_comp_reg, int_comp_next; 23 23 24 24 reg [5:0] int_cntr_reg, int_cntr_next; 25 25 26 assign int_comp_wire = (inp_data_reg[1] < inp_data); 26 assign int_comp_wire[0] = (inp_data_reg[1] < inp_data); 27 assign int_comp_wire[1] = (inp_data_reg[1] < max_data); 27 28 28 29 always @(posedge clock) … … 73 74 inp_data_next[0] = inp_data; 74 75 inp_data_next[1] = inp_data_reg[0]; 75 int_comp_next = int_comp_wire ;76 int_comp_next = int_comp_wire[0]; 76 77 out_data_next = {(width){1'b0}}; 77 78 out_flag_next = 1'b0; 78 79 // minimum 79 if ((~int_comp_reg) & (int_comp_wire ) & int_cntr_reg[5])80 if ((~int_comp_reg) & (int_comp_wire[0]) & int_cntr_reg[5]) 80 81 begin 81 82 int_mini_next = inp_data_reg[0]; … … 83 84 end 84 85 // maximum after minimum 85 else if ((int_comp_reg) & (~int_comp_wire ) & (int_flag_reg))86 else if ((int_comp_reg) & (~int_comp_wire[0]) & (int_flag_reg)) 86 87 begin 87 88 out_data_next = inp_data_reg[0] - int_mini_reg; 88 int_flag_next = 1'b0;89 // int_flag_next = 1'b0; 89 90 int_case_next = 1'b1; 90 91 end … … 102 103 int_cntr_next = 6'b0; 103 104 // out_flag_next = 1'b1; 104 out_flag_next = (inp_data_reg[1] < max_data); 105 out_flag_next = int_comp_wire[1]; 106 int_flag_next = ~int_comp_wire[1]; 105 107 end 106 108 int_case_next = 1'b0;
Note:
See TracChangeset
for help on using the changeset viewer.