Line 7... |
Line 7... |
//
|
//
|
// Abstract:
|
// Abstract:
|
// Geometry Engine memory controller.
|
// Geometry Engine memory controller.
|
//
|
//
|
// Author:
|
// Author:
|
// Kenji Ishimaru (kenji.ishimaru@prtissimo.com)
|
// Kenji Ishimaru (info.wf3d@gmail.com)
|
//
|
//
|
//======================================================================
|
//======================================================================
|
//
|
//
|
// Copyright (c) 2015, Kenji Ishimaru
|
// Copyright (c) 2015, Kenji Ishimaru
|
// All rights reserved.
|
// All rights reserved.
|
Line 44... |
Line 44... |
// system
|
// system
|
input clk_core,
|
input clk_core,
|
input rst_x,
|
input rst_x,
|
output o_state,
|
output o_state,
|
// Vertex Fetch Memory I/F (Read Only)
|
// Vertex Fetch Memory I/F (Read Only)
|
output o_req_m,
|
(* mark_debug = "true" *) output o_req_m,
|
output [31:0] o_adrs_m,
|
(* mark_debug = "true" *) output [31:0] o_adrs_m,
|
output [2:0] o_len_m,
|
(* mark_debug = "true" *) output [2:0] o_len_m,
|
input i_ack_m,
|
(* mark_debug = "true" *) input i_ack_m,
|
input i_strr_m,
|
(* mark_debug = "true" *) input i_strr_m,
|
input [31:0] i_dbr_m,
|
(* mark_debug = "true" *) input [31:0] i_dbr_m,
|
// Register Configuration
|
// Register Configuration
|
// vertex fetch
|
// vertex fetch
|
input i_dma_start,
|
(* mark_debug = "true" *) input i_dma_start,
|
input [29:0] i_dma_top_address,
|
(* mark_debug = "true" *) input [29:0] i_dma_top_address,
|
input [15:0] i_dma_size,
|
(* mark_debug = "true" *) input [15:0] i_dma_size,
|
output o_dma_end,
|
(* mark_debug = "true" *) output o_dma_end,
|
// vertex output
|
// vertex output
|
output o_en,
|
(* mark_debug = "true" *) output o_en,
|
input i_ack,
|
(* mark_debug = "true" *) input i_ack,
|
output [21:0] o_vx,
|
(* mark_debug = "true" *) output [21:0] o_vx,
|
output [21:0] o_vy,
|
(* mark_debug = "true" *) output [21:0] o_vy,
|
output [21:0] o_vz,
|
(* mark_debug = "true" *) output [21:0] o_vz,
|
output [21:0] o_vw
|
(* mark_debug = "true" *) output [21:0] o_vw
|
);
|
);
|
parameter P_BURST_MODE = 0;
|
parameter P_BURST_MODE = 0;
|
localparam P_IDLE = 'd0;
|
localparam P_IDLE = 'd0;
|
localparam P_REQ = 'd1;
|
localparam P_REQ = 'd1;
|
localparam P_RD_X = 'd2;
|
localparam P_RD_X = 'd2;
|
Line 77... |
Line 77... |
localparam P_DONE = 'd7;
|
localparam P_DONE = 'd7;
|
|
|
//////////////////////////////////
|
//////////////////////////////////
|
// reg
|
// reg
|
//////////////////////////////////
|
//////////////////////////////////
|
reg [2:0] r_state;
|
(* mark_debug = "true" *) reg [2:0] r_state;
|
reg [21:0] r_vx;
|
reg [21:0] r_vx;
|
reg [21:0] r_vy;
|
reg [21:0] r_vy;
|
reg [21:0] r_vz;
|
reg [21:0] r_vz;
|
reg [15:0] r_size;
|
reg [15:0] r_size;
|
reg [29:0] r_cur_adrs;
|
reg [29:0] r_cur_adrs;
|