x393  1.0
FPGAcodeforElphelNC393camera
simul_axi_master_wraddr.v
Go to the documentation of this file.
1 
39 `timescale 1ns/1ps
40 
42 #(
43  parameter integer ID_WIDTH=12,
44  parameter integer ADDRESS_WIDTH=32,
45  parameter integer LATENCY=0, // minimal delay between inout and output ( 0 - next cycle)
46  parameter integer DEPTH=8, // maximal number of commands in FIFO
47  parameter DATA_DELAY = 3.5,
48  parameter VALID_DELAY = 4.0
49 )(
50  input clk,
51  input reset,
52  input [ID_WIDTH-1:0] awid_in,
53  input [ADDRESS_WIDTH-1:0] awaddr_in,
54  input [3:0] awlen_in,
55  input [1:0] awsize_in,
56  input [1:0] awburst_in,
57  input [3:0] awcache_in,
58  input [2:0] awprot_in,
59 
60  output [ID_WIDTH-1:0] awid,
61  output [ADDRESS_WIDTH-1:0] awaddr,
62  output [3:0] awlen,
63  output [1:0] awsize,
64  output [1:0] awburst,
65  output [3:0] awcache,
66  output [2:0] awprot,
67  output awvalid,
68  input awready,
69 
70  input set_cmd, // latch all other input data at posedge of clock
71  output ready // command/data FIFO can accept command
72 );
73  wire [ID_WIDTH-1:0] awid_out;
75  wire [3:0] awlen_out;
76  wire [1:0] awsize_out;
77  wire [1:0] awburst_out;
78  wire [3:0] awcache_out;
79  wire [2:0] awprot_out;
81 
82  assign #(DATA_DELAY) awid= awid_out;
83  assign #(DATA_DELAY) awaddr= awaddr_out;
84  assign #(DATA_DELAY) awlen= awlen_out;
85  assign #(DATA_DELAY) awsize= awsize_out;
86  assign #(DATA_DELAY) awburst= awburst_out;
87  assign #(DATA_DELAY) awcache= awcache_out;
88  assign #(DATA_DELAY) awprot= awprot_out;
89  assign #(VALID_DELAY) awvalid= awvalid_out;
90 
92  #(
93  .WIDTH(ID_WIDTH+ADDRESS_WIDTH+15), // total number of output bits
94  .LATENCY(LATENCY), // minimal delay between inout and output ( 0 - next cycle)
95  .DEPTH(DEPTH) // maximal number of commands in FIFO
96 // parameter OUT_DELAY = 3.5,
97  ) simul_axi_fifo_i (
98  .clk(clk), // input clk,
99  .reset(reset), // input reset,
100  .data_in({awid_in,awaddr_in,awlen_in,awsize_in,awburst_in,awcache_in,awprot_in}), // input [WIDTH-1:0] data_in,
101  .load(set_cmd), // input load,
102  .input_ready(ready), // output input_ready,
104  .valid(awvalid_out), // output valid,
105  .ready(awready)); // input ready);
106 
107 endmodule
108 
[WIDTH-1:0] 8852data_in
[ADDRESS_WIDTH-1:0] 9120awaddr_in
[WIDTH-1:0] 8855data_out
[ADDRESS_WIDTH-1:0] 9127awaddr
9138awaddr_outwire[ADDRESS_WIDTH-1:0]