| 1 |
2 |
alfik |
/*
|
| 2 |
|
|
* Copyright (c) 2014, Aleksander Osman
|
| 3 |
|
|
* All rights reserved.
|
| 4 |
|
|
*
|
| 5 |
|
|
* Redistribution and use in source and binary forms, with or without
|
| 6 |
|
|
* modification, are permitted provided that the following conditions are met:
|
| 7 |
|
|
*
|
| 8 |
|
|
* * Redistributions of source code must retain the above copyright notice, this
|
| 9 |
|
|
* list of conditions and the following disclaimer.
|
| 10 |
|
|
*
|
| 11 |
|
|
* * Redistributions in binary form must reproduce the above copyright notice,
|
| 12 |
|
|
* this list of conditions and the following disclaimer in the documentation
|
| 13 |
|
|
* and/or other materials provided with the distribution.
|
| 14 |
|
|
*
|
| 15 |
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 16 |
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 17 |
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 18 |
|
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 19 |
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 20 |
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 21 |
|
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 22 |
|
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 23 |
|
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 24 |
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 25 |
|
|
*/
|
| 26 |
|
|
|
| 27 |
|
|
`include "defines.v"
|
| 28 |
|
|
|
| 29 |
|
|
module ao486 (
|
| 30 |
|
|
input clk,
|
| 31 |
|
|
input rst_n,
|
| 32 |
|
|
|
| 33 |
|
|
//--------------------------------------------------------------------------
|
| 34 |
|
|
input interrupt_do,
|
| 35 |
|
|
input [7:0] interrupt_vector,
|
| 36 |
|
|
output interrupt_done,
|
| 37 |
|
|
|
| 38 |
|
|
//-------------------------------------------------------------------------- Altera Avalon memory bus
|
| 39 |
|
|
output [31:0] avm_address,
|
| 40 |
|
|
output [31:0] avm_writedata,
|
| 41 |
|
|
output [3:0] avm_byteenable,
|
| 42 |
|
|
output [2:0] avm_burstcount,
|
| 43 |
|
|
output avm_write,
|
| 44 |
|
|
output avm_read,
|
| 45 |
|
|
|
| 46 |
|
|
input avm_waitrequest,
|
| 47 |
|
|
input avm_readdatavalid,
|
| 48 |
|
|
input [31:0] avm_readdata,
|
| 49 |
|
|
|
| 50 |
|
|
//-------------------------------------------------------------------------- Altera Avalon io bus
|
| 51 |
|
|
output [15:0] avalon_io_address,
|
| 52 |
|
|
output [3:0] avalon_io_byteenable,
|
| 53 |
|
|
|
| 54 |
|
|
output avalon_io_read,
|
| 55 |
|
|
input avalon_io_readdatavalid,
|
| 56 |
|
|
input [31:0] avalon_io_readdata,
|
| 57 |
|
|
|
| 58 |
|
|
output avalon_io_write,
|
| 59 |
|
|
output [31:0] avalon_io_writedata,
|
| 60 |
|
|
|
| 61 |
|
|
input avalon_io_waitrequest
|
| 62 |
|
|
);
|
| 63 |
|
|
|
| 64 |
|
|
//------------------------------------------------------------------------------
|
| 65 |
|
|
|
| 66 |
|
|
wire dec_gp_fault;
|
| 67 |
|
|
wire dec_ud_fault;
|
| 68 |
|
|
wire dec_pf_fault;
|
| 69 |
|
|
wire rd_seg_gp_fault;
|
| 70 |
|
|
wire rd_descriptor_gp_fault;
|
| 71 |
|
|
wire rd_seg_ss_fault;
|
| 72 |
|
|
wire rd_io_allow_fault;
|
| 73 |
|
|
wire rd_ss_esp_from_tss_fault;
|
| 74 |
|
|
wire exe_div_exception;
|
| 75 |
|
|
wire exe_trigger_gp_fault;
|
| 76 |
|
|
wire exe_trigger_ts_fault;
|
| 77 |
|
|
wire exe_trigger_ss_fault;
|
| 78 |
|
|
wire exe_trigger_np_fault;
|
| 79 |
|
|
wire exe_trigger_nm_fault;
|
| 80 |
|
|
wire exe_trigger_db_fault;
|
| 81 |
|
|
wire exe_trigger_pf_fault;
|
| 82 |
|
|
wire exe_bound_fault;
|
| 83 |
|
|
wire exe_load_seg_gp_fault;
|
| 84 |
|
|
wire exe_load_seg_ss_fault;
|
| 85 |
|
|
wire exe_load_seg_np_fault;
|
| 86 |
|
|
wire wr_debug_init;
|
| 87 |
|
|
wire wr_new_push_ss_fault;
|
| 88 |
|
|
wire wr_string_es_fault;
|
| 89 |
|
|
wire wr_push_ss_fault;
|
| 90 |
|
|
|
| 91 |
|
|
wire read_ac_fault;
|
| 92 |
|
|
wire read_page_fault;
|
| 93 |
|
|
wire write_ac_fault;
|
| 94 |
|
|
wire write_page_fault;
|
| 95 |
|
|
wire [15:0] tlb_code_pf_error_code;
|
| 96 |
|
|
wire [15:0] tlb_check_pf_error_code;
|
| 97 |
|
|
wire [15:0] tlb_write_pf_error_code;
|
| 98 |
|
|
wire [15:0] tlb_read_pf_error_code;
|
| 99 |
|
|
|
| 100 |
|
|
wire wr_int;
|
| 101 |
|
|
wire wr_int_soft_int;
|
| 102 |
|
|
wire wr_int_soft_int_ib;
|
| 103 |
|
|
wire [7:0] wr_int_vector;
|
| 104 |
|
|
wire wr_exception_external_set;
|
| 105 |
|
|
wire wr_exception_finished;
|
| 106 |
|
|
|
| 107 |
|
|
wire [31:0] eip;
|
| 108 |
|
|
wire [31:0] dec_eip;
|
| 109 |
|
|
wire [31:0] rd_eip;
|
| 110 |
|
|
wire [31:0] exe_eip;
|
| 111 |
|
|
wire [31:0] wr_eip;
|
| 112 |
|
|
wire [3:0] rd_consumed;
|
| 113 |
|
|
wire [3:0] exe_consumed;
|
| 114 |
|
|
wire [3:0] wr_consumed;
|
| 115 |
|
|
|
| 116 |
|
|
wire rd_dec_is_front;
|
| 117 |
|
|
wire rd_is_front;
|
| 118 |
|
|
wire exe_is_front;
|
| 119 |
|
|
wire wr_is_front;
|
| 120 |
|
|
|
| 121 |
|
|
wire wr_interrupt_possible;
|
| 122 |
|
|
wire wr_string_in_progress_final;
|
| 123 |
|
|
wire wr_is_esp_speculative;
|
| 124 |
|
|
|
| 125 |
|
|
wire real_mode;
|
| 126 |
|
|
|
| 127 |
|
|
wire [15:0] rd_error_code;
|
| 128 |
|
|
wire [15:0] exe_error_code;
|
| 129 |
|
|
wire [15:0] wr_error_code;
|
| 130 |
|
|
|
| 131 |
|
|
wire exc_dec_reset;
|
| 132 |
|
|
wire exc_micro_reset;
|
| 133 |
|
|
wire exc_rd_reset;
|
| 134 |
|
|
wire exc_exe_reset;
|
| 135 |
|
|
wire exc_wr_reset;
|
| 136 |
|
|
|
| 137 |
|
|
wire exc_restore_esp;
|
| 138 |
|
|
wire exc_set_rflag;
|
| 139 |
|
|
wire exc_debug_start;
|
| 140 |
|
|
wire exc_init;
|
| 141 |
|
|
wire exc_load;
|
| 142 |
|
|
wire [31:0] exc_eip;
|
| 143 |
|
|
wire [7:0] exc_vector;
|
| 144 |
|
|
wire [15:0] exc_error_code;
|
| 145 |
|
|
wire exc_push_error;
|
| 146 |
|
|
wire exc_soft_int;
|
| 147 |
|
|
wire exc_soft_int_ib;
|
| 148 |
|
|
wire exc_pf_read;
|
| 149 |
|
|
wire exc_pf_write;
|
| 150 |
|
|
wire exc_pf_code;
|
| 151 |
|
|
wire exc_pf_check;
|
| 152 |
|
|
|
| 153 |
|
|
exception exception_inst(
|
| 154 |
|
|
.clk (clk),
|
| 155 |
7 |
alfik |
.rst_n (rst_n),
|
| 156 |
2 |
alfik |
|
| 157 |
|
|
//exception indicators
|
| 158 |
|
|
.dec_gp_fault (dec_gp_fault), //input
|
| 159 |
|
|
.dec_ud_fault (dec_ud_fault), //input
|
| 160 |
|
|
.dec_pf_fault (dec_pf_fault), //input
|
| 161 |
|
|
|
| 162 |
|
|
.rd_seg_gp_fault (rd_seg_gp_fault), //input
|
| 163 |
|
|
.rd_descriptor_gp_fault (rd_descriptor_gp_fault), //input
|
| 164 |
|
|
.rd_seg_ss_fault (rd_seg_ss_fault), //input
|
| 165 |
|
|
.rd_io_allow_fault (rd_io_allow_fault), //input
|
| 166 |
|
|
.rd_ss_esp_from_tss_fault (rd_ss_esp_from_tss_fault), //input
|
| 167 |
|
|
|
| 168 |
|
|
.exe_div_exception (exe_div_exception), //input
|
| 169 |
|
|
.exe_trigger_gp_fault (exe_trigger_gp_fault), //input
|
| 170 |
|
|
.exe_trigger_ts_fault (exe_trigger_ts_fault), //input
|
| 171 |
|
|
.exe_trigger_ss_fault (exe_trigger_ss_fault), //input
|
| 172 |
|
|
.exe_trigger_np_fault (exe_trigger_np_fault), //input
|
| 173 |
|
|
.exe_trigger_nm_fault (exe_trigger_nm_fault), //input
|
| 174 |
|
|
.exe_trigger_db_fault (exe_trigger_db_fault), //input
|
| 175 |
|
|
.exe_trigger_pf_fault (exe_trigger_pf_fault), //input
|
| 176 |
|
|
.exe_bound_fault (exe_bound_fault), //input
|
| 177 |
|
|
.exe_load_seg_gp_fault (exe_load_seg_gp_fault), //input
|
| 178 |
|
|
.exe_load_seg_ss_fault (exe_load_seg_ss_fault), //input
|
| 179 |
|
|
.exe_load_seg_np_fault (exe_load_seg_np_fault), //input
|
| 180 |
|
|
|
| 181 |
|
|
.wr_debug_init (wr_debug_init), //input
|
| 182 |
|
|
.wr_new_push_ss_fault (wr_new_push_ss_fault), //input
|
| 183 |
|
|
.wr_string_es_fault (wr_string_es_fault), //input
|
| 184 |
|
|
.wr_push_ss_fault (wr_push_ss_fault), //input
|
| 185 |
|
|
|
| 186 |
|
|
//from memory
|
| 187 |
|
|
.read_ac_fault (read_ac_fault), //input
|
| 188 |
|
|
.read_page_fault (read_page_fault), //input
|
| 189 |
|
|
|
| 190 |
|
|
.write_ac_fault (write_ac_fault), //input
|
| 191 |
|
|
.write_page_fault (write_page_fault), //input
|
| 192 |
|
|
|
| 193 |
|
|
.tlb_code_pf_error_code (tlb_code_pf_error_code), //input [15:0]
|
| 194 |
|
|
.tlb_check_pf_error_code (tlb_check_pf_error_code), //input [15:0]
|
| 195 |
|
|
.tlb_write_pf_error_code (tlb_write_pf_error_code), //input [15:0]
|
| 196 |
|
|
.tlb_read_pf_error_code (tlb_read_pf_error_code), //input [15:0]
|
| 197 |
|
|
|
| 198 |
|
|
//wr_int
|
| 199 |
|
|
.wr_int (wr_int), //input
|
| 200 |
|
|
.wr_int_soft_int (wr_int_soft_int), //input
|
| 201 |
|
|
.wr_int_soft_int_ib (wr_int_soft_int_ib), //input
|
| 202 |
|
|
.wr_int_vector (wr_int_vector), //input [7:0]
|
| 203 |
|
|
|
| 204 |
|
|
.wr_exception_external_set (wr_exception_external_set), //input
|
| 205 |
|
|
.wr_exception_finished (wr_exception_finished), //input
|
| 206 |
|
|
|
| 207 |
|
|
//eip
|
| 208 |
|
|
.eip (eip), //input [31:0]
|
| 209 |
|
|
.dec_eip (dec_eip), //input [31:0]
|
| 210 |
|
|
.rd_eip (rd_eip), //input [31:0]
|
| 211 |
|
|
.exe_eip (exe_eip), //input [31:0]
|
| 212 |
|
|
.wr_eip (wr_eip), //input [31:0]
|
| 213 |
|
|
|
| 214 |
|
|
.rd_consumed (rd_consumed), //input [3:0]
|
| 215 |
|
|
.exe_consumed (exe_consumed), //input [3:0]
|
| 216 |
|
|
.wr_consumed (wr_consumed), //input [3:0]
|
| 217 |
|
|
|
| 218 |
|
|
//pipeline
|
| 219 |
|
|
.rd_dec_is_front (rd_dec_is_front), //input
|
| 220 |
|
|
.rd_is_front (rd_is_front), //input
|
| 221 |
|
|
.exe_is_front (exe_is_front), //input
|
| 222 |
|
|
.wr_is_front (wr_is_front), //input
|
| 223 |
|
|
|
| 224 |
|
|
//interrupt
|
| 225 |
|
|
.interrupt_vector (interrupt_vector), //input [7:0]
|
| 226 |
|
|
.interrupt_done (interrupt_done), //output
|
| 227 |
|
|
|
| 228 |
|
|
//input
|
| 229 |
|
|
.wr_interrupt_possible (wr_interrupt_possible), //input
|
| 230 |
|
|
.wr_string_in_progress_final (wr_string_in_progress_final), //input
|
| 231 |
|
|
.wr_is_esp_speculative (wr_is_esp_speculative), //input
|
| 232 |
|
|
|
| 233 |
|
|
.real_mode (real_mode), //input
|
| 234 |
|
|
|
| 235 |
|
|
.rd_error_code (rd_error_code), //input [15:0]
|
| 236 |
|
|
.exe_error_code (exe_error_code), //input [15:0]
|
| 237 |
|
|
.wr_error_code (wr_error_code), //input [15:0]
|
| 238 |
|
|
|
| 239 |
|
|
//output
|
| 240 |
|
|
.exc_dec_reset (exc_dec_reset), //output
|
| 241 |
|
|
.exc_micro_reset (exc_micro_reset), //output
|
| 242 |
|
|
.exc_rd_reset (exc_rd_reset), //output
|
| 243 |
|
|
.exc_exe_reset (exc_exe_reset), //output
|
| 244 |
|
|
.exc_wr_reset (exc_wr_reset), //output
|
| 245 |
|
|
|
| 246 |
|
|
//exception output
|
| 247 |
|
|
.exc_restore_esp (exc_restore_esp), //output
|
| 248 |
|
|
.exc_set_rflag (exc_set_rflag), //output
|
| 249 |
|
|
.exc_debug_start (exc_debug_start), //output
|
| 250 |
|
|
|
| 251 |
|
|
.exc_init (exc_init), //output
|
| 252 |
|
|
.exc_load (exc_load), //output
|
| 253 |
|
|
.exc_eip (exc_eip), //output [31:0]
|
| 254 |
|
|
|
| 255 |
|
|
.exc_vector (exc_vector), //output [7:0]
|
| 256 |
|
|
.exc_error_code (exc_error_code), //output [15:0]
|
| 257 |
|
|
.exc_push_error (exc_push_error), //output
|
| 258 |
|
|
.exc_soft_int (exc_soft_int), //output
|
| 259 |
|
|
.exc_soft_int_ib (exc_soft_int_ib), //output
|
| 260 |
|
|
|
| 261 |
|
|
.exc_pf_read (exc_pf_read), //output
|
| 262 |
|
|
.exc_pf_write (exc_pf_write), //output
|
| 263 |
|
|
.exc_pf_code (exc_pf_code), //output
|
| 264 |
|
|
.exc_pf_check (exc_pf_check) //output
|
| 265 |
|
|
);
|
| 266 |
|
|
|
| 267 |
|
|
//------------------------------------------------------------------------------
|
| 268 |
|
|
|
| 269 |
|
|
wire io_read_do;
|
| 270 |
|
|
wire [15:0] io_read_address;
|
| 271 |
|
|
wire [2:0] io_read_length;
|
| 272 |
|
|
wire [31:0] io_read_data;
|
| 273 |
|
|
wire io_read_done;
|
| 274 |
|
|
|
| 275 |
|
|
wire io_write_do;
|
| 276 |
|
|
wire [15:0] io_write_address;
|
| 277 |
|
|
wire [2:0] io_write_length;
|
| 278 |
|
|
wire [31:0] io_write_data;
|
| 279 |
|
|
wire io_write_done;
|
| 280 |
|
|
|
| 281 |
|
|
avalon_io avalon_io_inst(
|
| 282 |
|
|
.clk (clk),
|
| 283 |
|
|
.rst_n (rst_n),
|
| 284 |
|
|
|
| 285 |
|
|
//io_read
|
| 286 |
|
|
.io_read_do (io_read_do), //input
|
| 287 |
|
|
.io_read_address (io_read_address), //input [15:0]
|
| 288 |
|
|
.io_read_length (io_read_length), //input [2:0]
|
| 289 |
|
|
.io_read_data (io_read_data), //output [31:0]
|
| 290 |
|
|
.io_read_done (io_read_done), //output
|
| 291 |
|
|
|
| 292 |
|
|
//io_write
|
| 293 |
|
|
.io_write_do (io_write_do), //input
|
| 294 |
|
|
.io_write_address (io_write_address), //input [15:0]
|
| 295 |
|
|
.io_write_length (io_write_length), //input [2:0]
|
| 296 |
|
|
.io_write_data (io_write_data), //input [31:0]
|
| 297 |
|
|
.io_write_done (io_write_done), //output
|
| 298 |
|
|
|
| 299 |
|
|
.dcache_busy (dcache_busy), //input
|
| 300 |
|
|
|
| 301 |
|
|
//Avalon
|
| 302 |
|
|
.avalon_io_address (avalon_io_address), //output [15:0]
|
| 303 |
|
|
.avalon_io_byteenable (avalon_io_byteenable), //output [3:0]
|
| 304 |
|
|
|
| 305 |
|
|
.avalon_io_read (avalon_io_read), //output
|
| 306 |
|
|
.avalon_io_readdatavalid (avalon_io_readdatavalid), //input
|
| 307 |
|
|
.avalon_io_readdata (avalon_io_readdata), //input [31:0]
|
| 308 |
|
|
|
| 309 |
|
|
.avalon_io_write (avalon_io_write), //output
|
| 310 |
|
|
.avalon_io_writedata (avalon_io_writedata), //output [31:0]
|
| 311 |
|
|
.avalon_io_waitrequest (avalon_io_waitrequest) //input
|
| 312 |
|
|
);
|
| 313 |
|
|
|
| 314 |
|
|
//------------------------------------------------------------------------------
|
| 315 |
|
|
|
| 316 |
|
|
wire glob_param_1_set;
|
| 317 |
|
|
wire [31:0] glob_param_1_value;
|
| 318 |
|
|
wire glob_param_2_set;
|
| 319 |
|
|
wire [31:0] glob_param_2_value;
|
| 320 |
|
|
wire glob_param_3_set;
|
| 321 |
|
|
wire [31:0] glob_param_3_value;
|
| 322 |
|
|
wire glob_param_4_set;
|
| 323 |
|
|
wire [31:0] glob_param_4_value;
|
| 324 |
|
|
wire glob_param_5_set;
|
| 325 |
|
|
wire [31:0] glob_param_5_value;
|
| 326 |
|
|
wire glob_descriptor_set;
|
| 327 |
|
|
wire [63:0] glob_descriptor_value;
|
| 328 |
|
|
wire glob_descriptor_2_set;
|
| 329 |
|
|
wire [63:0] glob_descriptor_2_value;
|
| 330 |
|
|
wire [31:0] glob_param_1;
|
| 331 |
|
|
wire [31:0] glob_param_2;
|
| 332 |
|
|
wire [31:0] glob_param_3;
|
| 333 |
|
|
wire [31:0] glob_param_4;
|
| 334 |
|
|
wire [31:0] glob_param_5;
|
| 335 |
|
|
wire [63:0] glob_descriptor;
|
| 336 |
|
|
wire [63:0] glob_descriptor_2;
|
| 337 |
|
|
wire [31:0] glob_desc_base;
|
| 338 |
|
|
wire [31:0] glob_desc_limit;
|
| 339 |
|
|
wire [31:0] glob_desc_2_limit;
|
| 340 |
|
|
|
| 341 |
|
|
global_regs global_regs_inst(
|
| 342 |
|
|
.clk (clk),
|
| 343 |
7 |
alfik |
.rst_n (rst_n),
|
| 344 |
2 |
alfik |
|
| 345 |
|
|
//input
|
| 346 |
|
|
.glob_param_1_set (glob_param_1_set), //input
|
| 347 |
|
|
.glob_param_1_value (glob_param_1_value), //input [31:0]
|
| 348 |
|
|
.glob_param_2_set (glob_param_2_set), //input
|
| 349 |
|
|
.glob_param_2_value (glob_param_2_value), //input [31:0]
|
| 350 |
|
|
.glob_param_3_set (glob_param_3_set), //input
|
| 351 |
|
|
.glob_param_3_value (glob_param_3_value), //input [31:0]
|
| 352 |
|
|
.glob_param_4_set (glob_param_4_set), //input
|
| 353 |
|
|
.glob_param_4_value (glob_param_4_value), //input [31:0]
|
| 354 |
|
|
.glob_param_5_set (glob_param_5_set), //input
|
| 355 |
|
|
.glob_param_5_value (glob_param_5_value), //input [31:0]
|
| 356 |
|
|
.glob_descriptor_set (glob_descriptor_set), //input
|
| 357 |
|
|
.glob_descriptor_value (glob_descriptor_value), //input [63:0]
|
| 358 |
|
|
.glob_descriptor_2_set (glob_descriptor_2_set), //input
|
| 359 |
|
|
.glob_descriptor_2_value (glob_descriptor_2_value), //input [63:0]
|
| 360 |
|
|
|
| 361 |
|
|
//output
|
| 362 |
|
|
.glob_param_1 (glob_param_1), //output [31:0]
|
| 363 |
|
|
.glob_param_2 (glob_param_2), //output [31:0]
|
| 364 |
|
|
.glob_param_3 (glob_param_3), //output [31:0]
|
| 365 |
|
|
.glob_param_4 (glob_param_4), //output [31:0]
|
| 366 |
|
|
.glob_param_5 (glob_param_5), //output [31:0]
|
| 367 |
|
|
.glob_descriptor (glob_descriptor), //output [63:0]
|
| 368 |
|
|
.glob_descriptor_2 (glob_descriptor_2), //output [63:0]
|
| 369 |
|
|
.glob_desc_base (glob_desc_base), //output [31:0]
|
| 370 |
|
|
.glob_desc_limit (glob_desc_limit), //output [31:0]
|
| 371 |
|
|
.glob_desc_2_limit (glob_desc_2_limit) //output [31:0]
|
| 372 |
|
|
);
|
| 373 |
|
|
|
| 374 |
|
|
//------------------------------------------------------------------------------
|
| 375 |
|
|
|
| 376 |
|
|
wire read_do;
|
| 377 |
|
|
wire read_done;
|
| 378 |
|
|
|
| 379 |
|
|
wire [1:0] read_cpl;
|
| 380 |
|
|
wire [31:0] read_address;
|
| 381 |
|
|
wire [3:0] read_length;
|
| 382 |
|
|
wire read_lock;
|
| 383 |
|
|
wire read_rmw;
|
| 384 |
|
|
wire [63:0] read_data;
|
| 385 |
|
|
|
| 386 |
|
|
wire write_do;
|
| 387 |
|
|
wire write_done;
|
| 388 |
|
|
|
| 389 |
|
|
wire [1:0] write_cpl;
|
| 390 |
|
|
wire [31:0] write_address;
|
| 391 |
|
|
wire [2:0] write_length;
|
| 392 |
|
|
wire write_lock;
|
| 393 |
|
|
wire write_rmw;
|
| 394 |
|
|
wire [31:0] write_data;
|
| 395 |
|
|
|
| 396 |
|
|
wire tlbcheck_do;
|
| 397 |
|
|
wire tlbcheck_done;
|
| 398 |
|
|
wire tlbcheck_page_fault;
|
| 399 |
|
|
wire [31:0] tlbcheck_address;
|
| 400 |
|
|
wire tlbcheck_rw;
|
| 401 |
|
|
|
| 402 |
|
|
wire dcache_busy;
|
| 403 |
|
|
|
| 404 |
|
|
wire tlbflushsingle_do;
|
| 405 |
|
|
wire tlbflushsingle_done;
|
| 406 |
|
|
wire [31:0] tlbflushsingle_address;
|
| 407 |
|
|
|
| 408 |
|
|
wire tlbflushall_do;
|
| 409 |
|
|
wire invdcode_do;
|
| 410 |
|
|
wire invdcode_done;
|
| 411 |
|
|
wire invddata_do;
|
| 412 |
|
|
wire invddata_done;
|
| 413 |
|
|
wire wbinvddata_do;
|
| 414 |
|
|
wire wbinvddata_done;
|
| 415 |
|
|
|
| 416 |
|
|
wire [1:0] prefetch_cpl;
|
| 417 |
|
|
wire [31:0] prefetch_eip;
|
| 418 |
|
|
wire [63:0] cs_cache;
|
| 419 |
|
|
|
| 420 |
|
|
wire cr0_pg;
|
| 421 |
|
|
wire cr0_wp;
|
| 422 |
|
|
wire cr0_am;
|
| 423 |
|
|
wire cr0_cd;
|
| 424 |
|
|
wire cr0_nw;
|
| 425 |
|
|
|
| 426 |
|
|
wire acflag;
|
| 427 |
|
|
|
| 428 |
|
|
wire [31:0] cr3;
|
| 429 |
|
|
|
| 430 |
|
|
wire prefetchfifo_accept_do;
|
| 431 |
|
|
wire [67:0] prefetchfifo_accept_data;
|
| 432 |
|
|
wire prefetchfifo_accept_empty;
|
| 433 |
|
|
|
| 434 |
|
|
wire pipeline_after_read_empty;
|
| 435 |
|
|
wire pipeline_after_prefetch_empty;
|
| 436 |
|
|
|
| 437 |
|
|
wire [31:0] tlb_code_pf_cr2;
|
| 438 |
|
|
wire [31:0] tlb_check_pf_cr2;
|
| 439 |
|
|
wire [31:0] tlb_write_pf_cr2;
|
| 440 |
|
|
wire [31:0] tlb_read_pf_cr2;
|
| 441 |
|
|
|
| 442 |
|
|
wire pr_reset;
|
| 443 |
|
|
wire rd_reset;
|
| 444 |
|
|
wire exe_reset;
|
| 445 |
|
|
wire wr_reset;
|
| 446 |
|
|
|
| 447 |
|
|
|
| 448 |
|
|
memory memory_inst(
|
| 449 |
|
|
.clk (clk),
|
| 450 |
|
|
.rst_n (rst_n),
|
| 451 |
|
|
|
| 452 |
|
|
//REQ:
|
| 453 |
|
|
.read_do (read_do), //input
|
| 454 |
|
|
.read_done (read_done), //output
|
| 455 |
|
|
.read_page_fault (read_page_fault), //output
|
| 456 |
|
|
.read_ac_fault (read_ac_fault), //output
|
| 457 |
|
|
|
| 458 |
|
|
.read_cpl (read_cpl), //input [1:0]
|
| 459 |
|
|
.read_address (read_address), //input [31:0]
|
| 460 |
|
|
.read_length (read_length), //input [3:0]
|
| 461 |
|
|
.read_lock (read_lock), //input
|
| 462 |
|
|
.read_rmw (read_rmw), //input
|
| 463 |
|
|
.read_data (read_data), //output [63:0]
|
| 464 |
|
|
//END
|
| 465 |
|
|
|
| 466 |
|
|
//REQ:
|
| 467 |
|
|
.write_do (write_do), //input
|
| 468 |
|
|
.write_done (write_done), //output
|
| 469 |
|
|
.write_page_fault (write_page_fault), //output
|
| 470 |
|
|
.write_ac_fault (write_ac_fault), //output
|
| 471 |
|
|
|
| 472 |
|
|
.write_cpl (write_cpl), //input [1:0]
|
| 473 |
|
|
.write_address (write_address), //input [31:0]
|
| 474 |
|
|
.write_length (write_length), //input [2:0]
|
| 475 |
|
|
.write_lock (write_lock), //input
|
| 476 |
|
|
.write_rmw (write_rmw), //input
|
| 477 |
|
|
.write_data (write_data), //input [31:0]
|
| 478 |
|
|
//END
|
| 479 |
|
|
|
| 480 |
|
|
//REQ:
|
| 481 |
|
|
.tlbcheck_do (tlbcheck_do), //input
|
| 482 |
|
|
.tlbcheck_done (tlbcheck_done), //output
|
| 483 |
|
|
.tlbcheck_page_fault (tlbcheck_page_fault), //output
|
| 484 |
|
|
|
| 485 |
|
|
.tlbcheck_address (tlbcheck_address), //input [31:0]
|
| 486 |
|
|
.tlbcheck_rw (tlbcheck_rw), //input
|
| 487 |
|
|
//END
|
| 488 |
|
|
|
| 489 |
|
|
.dcache_busy (dcache_busy), //output
|
| 490 |
|
|
|
| 491 |
|
|
//RESP:
|
| 492 |
|
|
.tlbflushsingle_do (tlbflushsingle_do), //input
|
| 493 |
|
|
.tlbflushsingle_done (tlbflushsingle_done), //output
|
| 494 |
|
|
.tlbflushsingle_address (tlbflushsingle_address), //input [31:0]
|
| 495 |
|
|
//END
|
| 496 |
|
|
|
| 497 |
|
|
.tlbflushall_do (tlbflushall_do), //input
|
| 498 |
|
|
|
| 499 |
|
|
.invdcode_do (invdcode_do), //input
|
| 500 |
|
|
.invdcode_done (invdcode_done), //output
|
| 501 |
|
|
|
| 502 |
|
|
.invddata_do (invddata_do), //input
|
| 503 |
|
|
.invddata_done (invddata_done), //output
|
| 504 |
|
|
|
| 505 |
|
|
.wbinvddata_do (wbinvddata_do), //input
|
| 506 |
|
|
.wbinvddata_done (wbinvddata_done), //output
|
| 507 |
|
|
|
| 508 |
|
|
// prefetch exported
|
| 509 |
|
|
.prefetch_cpl (prefetch_cpl), //input [1:0]
|
| 510 |
|
|
.prefetch_eip (prefetch_eip), //input [31:0]
|
| 511 |
|
|
.cs_cache (cs_cache), //input [63:0]
|
| 512 |
|
|
|
| 513 |
|
|
.cr0_pg (cr0_pg), //input
|
| 514 |
|
|
.cr0_wp (cr0_wp), //input
|
| 515 |
|
|
.cr0_am (cr0_am), //input
|
| 516 |
|
|
.cr0_cd (cr0_cd), //input
|
| 517 |
|
|
.cr0_nw (cr0_nw), //input
|
| 518 |
|
|
|
| 519 |
|
|
.acflag (acflag), //input
|
| 520 |
|
|
|
| 521 |
|
|
.cr3 (cr3), //input [31:0]
|
| 522 |
|
|
|
| 523 |
|
|
// prefetch_fifo exported
|
| 524 |
|
|
.prefetchfifo_accept_do (prefetchfifo_accept_do), //input
|
| 525 |
|
|
.prefetchfifo_accept_data (prefetchfifo_accept_data), //output [67:0]
|
| 526 |
|
|
.prefetchfifo_accept_empty (prefetchfifo_accept_empty), //output
|
| 527 |
|
|
|
| 528 |
|
|
// pipeline state
|
| 529 |
|
|
.pipeline_after_read_empty (pipeline_after_read_empty), //input
|
| 530 |
|
|
.pipeline_after_prefetch_empty (pipeline_after_prefetch_empty), //input
|
| 531 |
|
|
|
| 532 |
|
|
.tlb_code_pf_error_code (tlb_code_pf_error_code), //output [15:0]
|
| 533 |
|
|
.tlb_check_pf_error_code (tlb_check_pf_error_code), //output [15:0]
|
| 534 |
|
|
.tlb_write_pf_error_code (tlb_write_pf_error_code), //output [15:0]
|
| 535 |
|
|
.tlb_read_pf_error_code (tlb_read_pf_error_code), //output [15:0]
|
| 536 |
|
|
|
| 537 |
|
|
.tlb_code_pf_cr2 (tlb_code_pf_cr2), //output [31:0]
|
| 538 |
|
|
.tlb_check_pf_cr2 (tlb_check_pf_cr2), //output [31:0]
|
| 539 |
|
|
.tlb_write_pf_cr2 (tlb_write_pf_cr2), //output [31:0]
|
| 540 |
|
|
.tlb_read_pf_cr2 (tlb_read_pf_cr2), //output [31:0]
|
| 541 |
|
|
|
| 542 |
|
|
// reset exported
|
| 543 |
|
|
.pr_reset (pr_reset), //input
|
| 544 |
|
|
.rd_reset (rd_reset), //input
|
| 545 |
|
|
.exe_reset (exe_reset), //input
|
| 546 |
|
|
.wr_reset (wr_reset), //input
|
| 547 |
|
|
|
| 548 |
|
|
// avalon master
|
| 549 |
|
|
.avm_address (avm_address), //output [31:0]
|
| 550 |
|
|
.avm_writedata (avm_writedata), //output [31:0]
|
| 551 |
|
|
.avm_byteenable (avm_byteenable), //output [3:0]
|
| 552 |
|
|
.avm_burstcount (avm_burstcount), //output [2:0]
|
| 553 |
|
|
.avm_write (avm_write), //output
|
| 554 |
|
|
.avm_read (avm_read), //output
|
| 555 |
|
|
.avm_waitrequest (avm_waitrequest), //input
|
| 556 |
|
|
.avm_readdatavalid (avm_readdatavalid), //input
|
| 557 |
|
|
.avm_readdata (avm_readdata) //input [31:0]
|
| 558 |
|
|
);
|
| 559 |
|
|
|
| 560 |
|
|
//------------------------------------------------------------------------------
|
| 561 |
|
|
|
| 562 |
|
|
pipeline pipeline_inst(
|
| 563 |
|
|
.clk (clk),
|
| 564 |
7 |
alfik |
.rst_n (rst_n),
|
| 565 |
2 |
alfik |
|
| 566 |
|
|
//to memory
|
| 567 |
|
|
.pr_reset (pr_reset), //output
|
| 568 |
|
|
.rd_reset (rd_reset), //output
|
| 569 |
|
|
.exe_reset (exe_reset), //output
|
| 570 |
|
|
.wr_reset (wr_reset), //output
|
| 571 |
|
|
|
| 572 |
|
|
.real_mode (real_mode), //output
|
| 573 |
|
|
|
| 574 |
|
|
//exception
|
| 575 |
|
|
.exc_restore_esp (exc_restore_esp), //input
|
| 576 |
|
|
.exc_set_rflag (exc_set_rflag), //input
|
| 577 |
|
|
.exc_debug_start (exc_debug_start), //input
|
| 578 |
|
|
|
| 579 |
|
|
.exc_init (exc_init), //input
|
| 580 |
|
|
.exc_load (exc_load), //input
|
| 581 |
|
|
.exc_eip (exc_eip), //input [31:0]
|
| 582 |
|
|
|
| 583 |
|
|
.exc_vector (exc_vector), //input [7:0]
|
| 584 |
|
|
.exc_error_code (exc_error_code), //input [15:0]
|
| 585 |
|
|
.exc_push_error (exc_push_error), //input
|
| 586 |
|
|
.exc_soft_int (exc_soft_int), //input
|
| 587 |
|
|
.exc_soft_int_ib (exc_soft_int_ib), //input
|
| 588 |
|
|
|
| 589 |
|
|
.exc_pf_read (exc_pf_read), //input
|
| 590 |
|
|
.exc_pf_write (exc_pf_write), //input
|
| 591 |
|
|
.exc_pf_code (exc_pf_code), //input
|
| 592 |
|
|
.exc_pf_check (exc_pf_check), //input
|
| 593 |
|
|
|
| 594 |
|
|
//pipeline eip
|
| 595 |
|
|
.eip (eip), //output [31:0]
|
| 596 |
|
|
.dec_eip (dec_eip), //output [31:0]
|
| 597 |
|
|
.rd_eip (rd_eip), //output [31:0]
|
| 598 |
|
|
.exe_eip (exe_eip), //output [31:0]
|
| 599 |
|
|
.wr_eip (wr_eip), //output [31:0]
|
| 600 |
|
|
|
| 601 |
|
|
.rd_consumed (rd_consumed), //output [3:0]
|
| 602 |
|
|
.exe_consumed (exe_consumed), //output [3:0]
|
| 603 |
|
|
.wr_consumed (wr_consumed), //output [3:0]
|
| 604 |
|
|
|
| 605 |
|
|
//exception reset
|
| 606 |
|
|
.exc_dec_reset (exc_dec_reset), //input
|
| 607 |
|
|
.exc_micro_reset (exc_micro_reset), //input
|
| 608 |
|
|
.exc_rd_reset (exc_rd_reset), //input
|
| 609 |
|
|
.exc_exe_reset (exc_exe_reset), //input
|
| 610 |
|
|
.exc_wr_reset (exc_wr_reset), //input
|
| 611 |
|
|
|
| 612 |
|
|
//global
|
| 613 |
|
|
.glob_param_1 (glob_param_1), //input [31:0]
|
| 614 |
|
|
.glob_param_2 (glob_param_2), //input [31:0]
|
| 615 |
|
|
.glob_param_3 (glob_param_3), //input [31:0]
|
| 616 |
|
|
.glob_param_4 (glob_param_4), //input [31:0]
|
| 617 |
|
|
.glob_param_5 (glob_param_5), //input [31:0]
|
| 618 |
|
|
|
| 619 |
|
|
.glob_descriptor (glob_descriptor), //input [63:0]
|
| 620 |
|
|
.glob_descriptor_2 (glob_descriptor_2), //input [63:0]
|
| 621 |
|
|
|
| 622 |
|
|
.glob_desc_base (glob_desc_base), //input [31:0]
|
| 623 |
|
|
|
| 624 |
|
|
.glob_desc_limit (glob_desc_limit), //input [31:0]
|
| 625 |
|
|
.glob_desc_2_limit (glob_desc_2_limit), //input [31:0]
|
| 626 |
|
|
|
| 627 |
|
|
//pipeline state
|
| 628 |
|
|
.rd_dec_is_front (rd_dec_is_front), //output
|
| 629 |
|
|
.rd_is_front (rd_is_front), //output
|
| 630 |
|
|
.exe_is_front (exe_is_front), //output
|
| 631 |
|
|
.wr_is_front (wr_is_front), //output
|
| 632 |
|
|
|
| 633 |
|
|
.pipeline_after_read_empty (pipeline_after_read_empty), //output
|
| 634 |
|
|
.pipeline_after_prefetch_empty (pipeline_after_prefetch_empty), //output
|
| 635 |
|
|
|
| 636 |
|
|
//dec exceptions
|
| 637 |
|
|
.dec_gp_fault (dec_gp_fault), //output
|
| 638 |
|
|
.dec_ud_fault (dec_ud_fault), //output
|
| 639 |
|
|
.dec_pf_fault (dec_pf_fault), //output
|
| 640 |
|
|
|
| 641 |
|
|
//rd exception
|
| 642 |
|
|
.rd_io_allow_fault (rd_io_allow_fault), //output
|
| 643 |
|
|
.rd_descriptor_gp_fault (rd_descriptor_gp_fault), //output
|
| 644 |
|
|
.rd_seg_gp_fault (rd_seg_gp_fault), //output
|
| 645 |
|
|
.rd_seg_ss_fault (rd_seg_ss_fault), //output
|
| 646 |
|
|
.rd_ss_esp_from_tss_fault (rd_ss_esp_from_tss_fault), //output
|
| 647 |
|
|
|
| 648 |
|
|
//exe exception
|
| 649 |
|
|
.exe_bound_fault (exe_bound_fault), //output
|
| 650 |
|
|
.exe_trigger_gp_fault (exe_trigger_gp_fault), //output
|
| 651 |
|
|
.exe_trigger_ts_fault (exe_trigger_ts_fault), //output
|
| 652 |
|
|
.exe_trigger_ss_fault (exe_trigger_ss_fault), //output
|
| 653 |
|
|
.exe_trigger_np_fault (exe_trigger_np_fault), //output
|
| 654 |
|
|
.exe_trigger_pf_fault (exe_trigger_pf_fault), //output
|
| 655 |
|
|
.exe_trigger_db_fault (exe_trigger_db_fault), //output
|
| 656 |
|
|
.exe_trigger_nm_fault (exe_trigger_nm_fault), //output
|
| 657 |
|
|
.exe_load_seg_gp_fault (exe_load_seg_gp_fault), //output
|
| 658 |
|
|
.exe_load_seg_ss_fault (exe_load_seg_ss_fault), //output
|
| 659 |
|
|
.exe_load_seg_np_fault (exe_load_seg_np_fault), //output
|
| 660 |
|
|
.exe_div_exception (exe_div_exception), //output
|
| 661 |
|
|
|
| 662 |
|
|
//wr exception
|
| 663 |
|
|
.wr_debug_init (wr_debug_init), //output
|
| 664 |
|
|
.wr_new_push_ss_fault (wr_new_push_ss_fault), //output
|
| 665 |
|
|
.wr_string_es_fault (wr_string_es_fault), //output
|
| 666 |
|
|
.wr_push_ss_fault (wr_push_ss_fault), //output
|
| 667 |
|
|
|
| 668 |
|
|
//error code
|
| 669 |
|
|
.rd_error_code (rd_error_code), //output [15:0]
|
| 670 |
|
|
.exe_error_code (exe_error_code), //output [15:0]
|
| 671 |
|
|
.wr_error_code (wr_error_code), //output [15:0]
|
| 672 |
|
|
|
| 673 |
|
|
//glob output
|
| 674 |
|
|
.glob_descriptor_set (glob_descriptor_set), //output
|
| 675 |
|
|
.glob_descriptor_value (glob_descriptor_value), //output [63:0]
|
| 676 |
|
|
.glob_descriptor_2_set (glob_descriptor_2_set), //output
|
| 677 |
|
|
.glob_descriptor_2_value (glob_descriptor_2_value), //output [63:0]
|
| 678 |
|
|
|
| 679 |
|
|
.glob_param_1_set (glob_param_1_set), //output
|
| 680 |
|
|
.glob_param_1_value (glob_param_1_value), //output [31:0]
|
| 681 |
|
|
.glob_param_2_set (glob_param_2_set), //output
|
| 682 |
|
|
.glob_param_2_value (glob_param_2_value), //output [31:0]
|
| 683 |
|
|
.glob_param_3_set (glob_param_3_set), //output
|
| 684 |
|
|
.glob_param_3_value (glob_param_3_value), //output [31:0]
|
| 685 |
|
|
.glob_param_4_set (glob_param_4_set), //output
|
| 686 |
|
|
.glob_param_4_value (glob_param_4_value), //output [31:0]
|
| 687 |
|
|
.glob_param_5_set (glob_param_5_set), //output
|
| 688 |
|
|
.glob_param_5_value (glob_param_5_value), //output [31:0]
|
| 689 |
|
|
|
| 690 |
|
|
// prefetch
|
| 691 |
|
|
.prefetch_cpl (prefetch_cpl), //output [1:0]
|
| 692 |
|
|
.prefetch_eip (prefetch_eip), //output [31:0]
|
| 693 |
|
|
|
| 694 |
|
|
.cs_cache (cs_cache), //output [63:0]
|
| 695 |
|
|
|
| 696 |
|
|
.cr0_pg (cr0_pg), //output
|
| 697 |
|
|
.cr0_wp (cr0_wp), //output
|
| 698 |
|
|
.cr0_am (cr0_am), //output
|
| 699 |
|
|
.cr0_cd (cr0_cd), //output
|
| 700 |
|
|
.cr0_nw (cr0_nw), //output
|
| 701 |
|
|
|
| 702 |
|
|
.acflag (acflag), //output
|
| 703 |
|
|
|
| 704 |
|
|
.cr3 (cr3), //output [31:0]
|
| 705 |
|
|
|
| 706 |
|
|
// prefetch_fifo
|
| 707 |
|
|
.prefetchfifo_accept_do (prefetchfifo_accept_do), //output
|
| 708 |
|
|
.prefetchfifo_accept_data (prefetchfifo_accept_data), //input [67:0]
|
| 709 |
|
|
.prefetchfifo_accept_empty (prefetchfifo_accept_empty), //input
|
| 710 |
|
|
|
| 711 |
|
|
//io_read
|
| 712 |
|
|
.io_read_do (io_read_do), //output
|
| 713 |
|
|
.io_read_address (io_read_address), //output [15:0]
|
| 714 |
|
|
.io_read_length (io_read_length), //output [2:0]
|
| 715 |
|
|
.io_read_data (io_read_data), //input [31:0]
|
| 716 |
|
|
.io_read_done (io_read_done), //input
|
| 717 |
|
|
|
| 718 |
|
|
//read memory
|
| 719 |
|
|
.read_do (read_do), //output
|
| 720 |
|
|
.read_done (read_done), //input
|
| 721 |
|
|
.read_page_fault (read_page_fault), //input
|
| 722 |
|
|
.read_ac_fault (read_ac_fault), //input
|
| 723 |
|
|
|
| 724 |
|
|
.read_cpl (read_cpl), //output [1:0]
|
| 725 |
|
|
.read_address (read_address), //output [31:0]
|
| 726 |
|
|
.read_length (read_length), //output [3:0]
|
| 727 |
|
|
.read_lock (read_lock), //output
|
| 728 |
|
|
.read_rmw (read_rmw), //output
|
| 729 |
|
|
.read_data (read_data), //input [63:0]
|
| 730 |
|
|
|
| 731 |
|
|
//tlbcheck
|
| 732 |
|
|
.tlbcheck_do (tlbcheck_do), //output
|
| 733 |
|
|
.tlbcheck_done (tlbcheck_done), //input
|
| 734 |
|
|
.tlbcheck_page_fault (tlbcheck_page_fault), //input
|
| 735 |
|
|
|
| 736 |
|
|
.tlbcheck_address (tlbcheck_address), //output [31:0]
|
| 737 |
|
|
.tlbcheck_rw (tlbcheck_rw), //output
|
| 738 |
|
|
|
| 739 |
|
|
//tlbflushsingle
|
| 740 |
|
|
.tlbflushsingle_do (tlbflushsingle_do), //output
|
| 741 |
|
|
.tlbflushsingle_done (tlbflushsingle_done), //input
|
| 742 |
|
|
|
| 743 |
|
|
.tlbflushsingle_address (tlbflushsingle_address), //output [31:0]
|
| 744 |
|
|
|
| 745 |
|
|
//flush tlb
|
| 746 |
|
|
.tlbflushall_do (tlbflushall_do), //output
|
| 747 |
|
|
|
| 748 |
|
|
.invdcode_do (invdcode_do), //output
|
| 749 |
|
|
.invdcode_done (invdcode_done), //input
|
| 750 |
|
|
|
| 751 |
|
|
.invddata_do (invddata_do), //output
|
| 752 |
|
|
.invddata_done (invddata_done), //input
|
| 753 |
|
|
|
| 754 |
|
|
.wbinvddata_do (wbinvddata_do), //output
|
| 755 |
|
|
.wbinvddata_done (wbinvddata_done), //input
|
| 756 |
|
|
|
| 757 |
|
|
//interrupt
|
| 758 |
|
|
.interrupt_do (interrupt_do), //input
|
| 759 |
|
|
|
| 760 |
|
|
.wr_interrupt_possible (wr_interrupt_possible), //output
|
| 761 |
|
|
.wr_string_in_progress_final (wr_string_in_progress_final), //output
|
| 762 |
|
|
.wr_is_esp_speculative (wr_is_esp_speculative), //output
|
| 763 |
|
|
|
| 764 |
|
|
//software interrupt
|
| 765 |
|
|
.wr_int (wr_int), //output
|
| 766 |
|
|
.wr_int_soft_int (wr_int_soft_int), //output
|
| 767 |
|
|
.wr_int_soft_int_ib (wr_int_soft_int_ib), //output
|
| 768 |
|
|
.wr_int_vector (wr_int_vector), //output [7:0]
|
| 769 |
|
|
|
| 770 |
|
|
.wr_exception_external_set (wr_exception_external_set), //output
|
| 771 |
|
|
.wr_exception_finished (wr_exception_finished), //output
|
| 772 |
|
|
|
| 773 |
|
|
//memory page fault
|
| 774 |
|
|
.tlb_code_pf_cr2 (tlb_code_pf_cr2), //input [31:0]
|
| 775 |
|
|
.tlb_write_pf_cr2 (tlb_write_pf_cr2), //input [31:0]
|
| 776 |
|
|
.tlb_read_pf_cr2 (tlb_read_pf_cr2), //input [31:0]
|
| 777 |
|
|
.tlb_check_pf_cr2 (tlb_check_pf_cr2), //input [31:0]
|
| 778 |
|
|
|
| 779 |
|
|
//memory write
|
| 780 |
|
|
.write_do (write_do), //output
|
| 781 |
|
|
.write_done (write_done), //input
|
| 782 |
|
|
.write_page_fault (write_page_fault), //input
|
| 783 |
|
|
.write_ac_fault (write_ac_fault), //input
|
| 784 |
|
|
|
| 785 |
|
|
.write_cpl (write_cpl), //output [1:0]
|
| 786 |
|
|
.write_address (write_address), //output [31:0]
|
| 787 |
|
|
.write_length (write_length), //output [2:0]
|
| 788 |
|
|
.write_lock (write_lock), //output
|
| 789 |
|
|
.write_rmw (write_rmw), //output
|
| 790 |
|
|
.write_data (write_data), //output [31:0]
|
| 791 |
|
|
|
| 792 |
|
|
//io write
|
| 793 |
|
|
.io_write_do (io_write_do), //output
|
| 794 |
|
|
.io_write_address (io_write_address), //output [15:0]
|
| 795 |
|
|
.io_write_length (io_write_length), //output [2:0]
|
| 796 |
|
|
.io_write_data (io_write_data), //output [31:0]
|
| 797 |
|
|
.io_write_done (io_write_done) //input
|
| 798 |
|
|
);
|
| 799 |
|
|
|
| 800 |
|
|
//------------------------------------------------------------------------------
|
| 801 |
|
|
|
| 802 |
|
|
endmodule
|