| 1 |
32 |
redbear |
// (C) 2001-2017 Intel Corporation. All rights reserved.
|
| 2 |
|
|
// Your use of Intel Corporation's design tools, logic functions and other
|
| 3 |
|
|
// software and tools, and its AMPP partner logic functions, and any output
|
| 4 |
|
|
// files any of the foregoing (including device programming or simulation
|
| 5 |
|
|
// files), and any associated documentation or information are expressly subject
|
| 6 |
|
|
// to the terms and conditions of the Intel Program License Subscription
|
| 7 |
|
|
// Agreement, Intel MegaCore Function License Agreement, or other applicable
|
| 8 |
|
|
// license agreement, including, without limitation, that your use is for the
|
| 9 |
|
|
// sole purpose of programming logic devices manufactured by Intel and sold by
|
| 10 |
|
|
// Intel or its authorized distributors. Please refer to the applicable
|
| 11 |
|
|
// agreement for further details.
|
| 12 |
|
|
|
| 13 |
|
|
|
| 14 |
|
|
// (C) 2001-2012 Altera Corporation. All rights reserved.
|
| 15 |
|
|
// Your use of Altera Corporation's design tools, logic functions and other
|
| 16 |
|
|
// software and tools, and its AMPP partner logic functions, and any output
|
| 17 |
|
|
// files any of the foregoing (including device programming or simulation
|
| 18 |
|
|
// files), and any associated documentation or information are expressly subject
|
| 19 |
|
|
// to the terms and conditions of the Altera Program License Subscription
|
| 20 |
|
|
// Agreement, Altera MegaCore Function License Agreement, or other applicable
|
| 21 |
|
|
// license agreement, including, without limitation, that your use is for the
|
| 22 |
|
|
// sole purpose of programming logic devices manufactured by Altera and sold by
|
| 23 |
|
|
// Altera or its authorized distributors. Please refer to the applicable
|
| 24 |
|
|
// agreement for further details.
|
| 25 |
|
|
|
| 26 |
|
|
|
| 27 |
|
|
// $Id: //acds/main/ip/merlin/altera_merlin_burst_adapter/altera_merlin_burst_adapter.sv#68 $
|
| 28 |
|
|
// $Revision: #68 $
|
| 29 |
|
|
// $Date: 2014/01/23 $
|
| 30 |
|
|
// $Author: wkleong $
|
| 31 |
|
|
|
| 32 |
|
|
`timescale 1 ns / 1 ns
|
| 33 |
|
|
|
| 34 |
|
|
// -------------------------------------------------------
|
| 35 |
|
|
// Adapter for uncompressed transactions only. This adapter will
|
| 36 |
|
|
// typically be used to adapt burst length for non-bursting
|
| 37 |
|
|
// wide to narrow Avalon links.
|
| 38 |
|
|
// -------------------------------------------------------
|
| 39 |
|
|
module altera_merlin_burst_adapter_uncompressed_only
|
| 40 |
|
|
#(
|
| 41 |
|
|
parameter
|
| 42 |
|
|
PKT_BYTE_CNT_H = 5,
|
| 43 |
|
|
PKT_BYTE_CNT_L = 0,
|
| 44 |
|
|
PKT_BYTEEN_H = 83,
|
| 45 |
|
|
PKT_BYTEEN_L = 80,
|
| 46 |
|
|
ST_DATA_W = 84,
|
| 47 |
|
|
ST_CHANNEL_W = 8
|
| 48 |
|
|
)
|
| 49 |
|
|
(
|
| 50 |
|
|
input clk,
|
| 51 |
|
|
input reset,
|
| 52 |
|
|
|
| 53 |
|
|
// -------------------
|
| 54 |
|
|
// Command Sink (Input)
|
| 55 |
|
|
// -------------------
|
| 56 |
|
|
input sink0_valid,
|
| 57 |
|
|
input [ST_DATA_W-1 : 0] sink0_data,
|
| 58 |
|
|
input [ST_CHANNEL_W-1 : 0] sink0_channel,
|
| 59 |
|
|
input sink0_startofpacket,
|
| 60 |
|
|
input sink0_endofpacket,
|
| 61 |
|
|
output reg sink0_ready,
|
| 62 |
|
|
|
| 63 |
|
|
// -------------------
|
| 64 |
|
|
// Command Source (Output)
|
| 65 |
|
|
// -------------------
|
| 66 |
|
|
output reg source0_valid,
|
| 67 |
|
|
output reg [ST_DATA_W-1 : 0] source0_data,
|
| 68 |
|
|
output reg [ST_CHANNEL_W-1 : 0] source0_channel,
|
| 69 |
|
|
output reg source0_startofpacket,
|
| 70 |
|
|
output reg source0_endofpacket,
|
| 71 |
|
|
input source0_ready
|
| 72 |
|
|
);
|
| 73 |
|
|
localparam
|
| 74 |
|
|
PKT_BYTE_CNT_W = PKT_BYTE_CNT_H - PKT_BYTE_CNT_L + 1,
|
| 75 |
|
|
NUM_SYMBOLS = PKT_BYTEEN_H - PKT_BYTEEN_L + 1;
|
| 76 |
|
|
|
| 77 |
|
|
wire [PKT_BYTE_CNT_W - 1 : 0] num_symbols_sig = NUM_SYMBOLS[PKT_BYTE_CNT_W - 1 : 0];
|
| 78 |
|
|
|
| 79 |
|
|
always_comb begin : source0_data_assignments
|
| 80 |
|
|
source0_valid = sink0_valid;
|
| 81 |
|
|
source0_channel = sink0_channel;
|
| 82 |
|
|
source0_startofpacket = sink0_startofpacket;
|
| 83 |
|
|
source0_endofpacket = sink0_endofpacket;
|
| 84 |
|
|
|
| 85 |
|
|
source0_data = sink0_data;
|
| 86 |
|
|
source0_data[PKT_BYTE_CNT_H : PKT_BYTE_CNT_L] = num_symbols_sig;
|
| 87 |
|
|
|
| 88 |
|
|
sink0_ready = source0_ready;
|
| 89 |
|
|
end
|
| 90 |
|
|
|
| 91 |
|
|
endmodule
|
| 92 |
|
|
|
| 93 |
|
|
|
| 94 |
|
|
|