📄 nios2e_2c35.v
字号:
ext_flash_s1_wait_counter_eq_0,
ext_flash_s1_wait_counter_eq_1,
incoming_ext_bus_data,
reset_n,
// outputs:
cpu_instruction_master_address_to_slave,
cpu_instruction_master_dbs_address,
cpu_instruction_master_readdata,
cpu_instruction_master_waitrequest
)
/* synthesis auto_dissolve = "FALSE" */ ;
output [ 25: 0] cpu_instruction_master_address_to_slave;
output [ 1: 0] cpu_instruction_master_dbs_address;
output [ 31: 0] cpu_instruction_master_readdata;
output cpu_instruction_master_waitrequest;
input clk;
input [ 25: 0] cpu_instruction_master_address;
input cpu_instruction_master_granted_cpu_jtag_debug_module;
input cpu_instruction_master_granted_ddr_sdram_s1;
input cpu_instruction_master_granted_ext_flash_s1;
input cpu_instruction_master_qualified_request_cpu_jtag_debug_module;
input cpu_instruction_master_qualified_request_ddr_sdram_s1;
input cpu_instruction_master_qualified_request_ext_flash_s1;
input cpu_instruction_master_read;
input cpu_instruction_master_read_data_valid_cpu_jtag_debug_module;
input cpu_instruction_master_read_data_valid_ddr_sdram_s1;
input cpu_instruction_master_read_data_valid_ddr_sdram_s1_shift_register;
input cpu_instruction_master_read_data_valid_ext_flash_s1;
input cpu_instruction_master_requests_cpu_jtag_debug_module;
input cpu_instruction_master_requests_ddr_sdram_s1;
input cpu_instruction_master_requests_ext_flash_s1;
input [ 31: 0] cpu_jtag_debug_module_readdata_from_sa;
input d1_cpu_jtag_debug_module_end_xfer;
input d1_ddr_sdram_s1_end_xfer;
input d1_ext_bus_avalon_slave_end_xfer;
input [ 31: 0] ddr_sdram_s1_readdata_from_sa;
input ddr_sdram_s1_waitrequest_n_from_sa;
input ext_flash_s1_wait_counter_eq_0;
input ext_flash_s1_wait_counter_eq_1;
input [ 15: 0] incoming_ext_bus_data;
input reset_n;
reg active_and_waiting_last_time;
reg [ 25: 0] cpu_instruction_master_address_last_time;
wire [ 25: 0] cpu_instruction_master_address_to_slave;
reg [ 1: 0] cpu_instruction_master_dbs_address;
wire [ 1: 0] cpu_instruction_master_dbs_increment;
reg cpu_instruction_master_read_last_time;
wire [ 31: 0] cpu_instruction_master_readdata;
wire cpu_instruction_master_run;
wire cpu_instruction_master_waitrequest;
reg [ 15: 0] dbs_16_reg_segment_0;
wire dbs_count_enable;
wire dbs_counter_overflow;
wire [ 1: 0] next_dbs_address;
wire [ 15: 0] p1_dbs_16_reg_segment_0;
wire pre_dbs_count_enable;
wire r_0;
//r_0 master_run cascaded wait assignment, which is an e_assign
assign r_0 = 1 & (cpu_instruction_master_qualified_request_cpu_jtag_debug_module | ~cpu_instruction_master_requests_cpu_jtag_debug_module) & (cpu_instruction_master_granted_cpu_jtag_debug_module | ~cpu_instruction_master_qualified_request_cpu_jtag_debug_module) & ((~cpu_instruction_master_qualified_request_cpu_jtag_debug_module | ~(cpu_instruction_master_read) | (1 & ~d1_cpu_jtag_debug_module_end_xfer & (cpu_instruction_master_read)))) & 1 & (cpu_instruction_master_qualified_request_ddr_sdram_s1 | cpu_instruction_master_read_data_valid_ddr_sdram_s1 | ~cpu_instruction_master_requests_ddr_sdram_s1) & (cpu_instruction_master_granted_ddr_sdram_s1 | ~cpu_instruction_master_qualified_request_ddr_sdram_s1) & ((~cpu_instruction_master_qualified_request_ddr_sdram_s1 | ~cpu_instruction_master_read | (cpu_instruction_master_read_data_valid_ddr_sdram_s1 & cpu_instruction_master_read))) & 1 & (cpu_instruction_master_qualified_request_ext_flash_s1 | (cpu_instruction_master_read_data_valid_ext_flash_s1 & cpu_instruction_master_dbs_address[1]) | ~cpu_instruction_master_requests_ext_flash_s1) & (cpu_instruction_master_granted_ext_flash_s1 | ~cpu_instruction_master_qualified_request_ext_flash_s1) & ((~cpu_instruction_master_qualified_request_ext_flash_s1 | ~cpu_instruction_master_read | (cpu_instruction_master_read_data_valid_ext_flash_s1 & (cpu_instruction_master_dbs_address[1]) & cpu_instruction_master_read)));
//cascaded wait assignment, which is an e_assign
assign cpu_instruction_master_run = r_0;
//optimize select-logic by passing only those address bits which matter.
assign cpu_instruction_master_address_to_slave = cpu_instruction_master_address[25 : 0];
//cpu/instruction_master readdata mux, which is an e_mux
assign cpu_instruction_master_readdata = ({32 {~cpu_instruction_master_requests_cpu_jtag_debug_module}} | cpu_jtag_debug_module_readdata_from_sa) &
({32 {~cpu_instruction_master_requests_ddr_sdram_s1}} | ddr_sdram_s1_readdata_from_sa) &
({32 {~cpu_instruction_master_requests_ext_flash_s1}} | {incoming_ext_bus_data[15 : 0],
dbs_16_reg_segment_0});
//actual waitrequest port, which is an e_assign
assign cpu_instruction_master_waitrequest = ~cpu_instruction_master_run;
//input to dbs-16 stored 0, which is an e_mux
assign p1_dbs_16_reg_segment_0 = incoming_ext_bus_data;
//dbs register for dbs-16 segment 0, which is an e_register
always @(posedge clk or negedge reset_n)
begin
if (reset_n == 0)
dbs_16_reg_segment_0 <= 0;
else if (dbs_count_enable & ((cpu_instruction_master_dbs_address[1]) == 0))
dbs_16_reg_segment_0 <= p1_dbs_16_reg_segment_0;
end
//dbs count increment, which is an e_mux
assign cpu_instruction_master_dbs_increment = (cpu_instruction_master_requests_ext_flash_s1)? 2 :
0;
//dbs counter overflow, which is an e_assign
assign dbs_counter_overflow = cpu_instruction_master_dbs_address[1] & !(next_dbs_address[1]);
//next master address, which is an e_assign
assign next_dbs_address = cpu_instruction_master_dbs_address + cpu_instruction_master_dbs_increment;
//dbs count enable, which is an e_mux
assign dbs_count_enable = pre_dbs_count_enable;
//dbs counter, which is an e_register
always @(posedge clk or negedge reset_n)
begin
if (reset_n == 0)
cpu_instruction_master_dbs_address <= 0;
else if (dbs_count_enable)
cpu_instruction_master_dbs_address <= next_dbs_address;
end
//pre dbs count enable, which is an e_mux
assign pre_dbs_count_enable = cpu_instruction_master_read_data_valid_ext_flash_s1;
//synthesis translate_off
//////////////// SIMULATION-ONLY CONTENTS
//cpu_instruction_master_address check against wait, which is an e_register
always @(posedge clk or negedge reset_n)
begin
if (reset_n == 0)
cpu_instruction_master_address_last_time <= 0;
else if (1)
cpu_instruction_master_address_last_time <= cpu_instruction_master_address;
end
//cpu/instruction_master waited last time, which is an e_register
always @(posedge clk or negedge reset_n)
begin
if (reset_n == 0)
active_and_waiting_last_time <= 0;
else if (1)
active_and_waiting_last_time <= cpu_instruction_master_waitrequest & (cpu_instruction_master_read);
end
//cpu_instruction_master_address matches last port_name, which is an e_process
always @(active_and_waiting_last_time or cpu_instruction_master_address or cpu_instruction_master_address_last_time)
begin
if (active_and_waiting_last_time & (cpu_instruction_master_address != cpu_instruction_master_address_last_time))
begin
$write("%0d ns: cpu_instruction_master_address did not heed wait!!!", $time);
$stop;
end
end
//cpu_instruction_master_read check against wait, which is an e_register
always @(posedge clk or negedge reset_n)
begin
if (reset_n == 0)
cpu_instruction_master_read_last_time <= 0;
else if (1)
cpu_instruction_master_read_last_time <= cpu_instruction_master_read;
end
//cpu_instruction_master_read matches last port_name, which is an e_process
always @(active_and_waiting_last_time or cpu_instruction_master_read or cpu_instruction_master_read_last_time)
begin
if (active_and_waiting_last_time & (cpu_instruction_master_read != cpu_instruction_master_read_last_time))
begin
$write("%0d ns: cpu_instruction_master_read did not heed wait!!!", $time);
$stop;
end
end
//////////////// END SIMULATION-ONLY CONTENTS
//synthesis translate_on
endmodule
// turn off superfluous verilog processor warnings
// altera message_level Level1
// altera message_off 10034 10035 10036 10037 10230 10240 10030
module rdv_fifo_for_cpu_data_master_to_ddr_sdram_s1_module (
// inputs:
clear_fifo,
clk,
data_in,
read,
reset_n,
sync_reset,
write,
// outputs:
data_out,
empty,
fifo_contains_ones_n,
full
)
;
output data_out;
output empty;
output fifo_contains_ones_n;
output full;
input clear_fifo;
input clk;
input data_in;
input read;
input reset_n;
input sync_reset;
input write;
wire data_out;
wire empty;
reg fifo_contains_ones_n;
wire full;
reg full_0;
reg full_1;
reg full_10;
reg full_11;
reg full_12;
reg full_13;
reg full_14;
reg full_15;
wire full_16;
reg full_2;
reg full_3;
reg full_4;
reg full_5;
reg full_6;
reg full_7;
reg full_8;
reg full_9;
reg [ 5: 0] how_many_ones;
wire [ 5: 0] one_count_minus_one;
wire [ 5: 0] one_count_plus_one;
wire p0_full_0;
wire p0_stage_0;
wire p10_full_10;
wire p10_stage_10;
wire p11_full_11;
wire p11_stage_11;
wire p12_full_12;
wire p12_stage_12;
wire p13_full_13;
wire p13_stage_13;
wire p14_full_14;
wire p14_stage_14;
wire p15_full_15;
wire p15_stage_15;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -