| 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 |
40 |
redbear |
// files from any of the foregoing (including device programming or simulation
|
| 5 |
32 |
redbear |
// files), and any associated documentation or information are expressly subject
|
| 6 |
|
|
// to the terms and conditions of the Intel Program License Subscription
|
| 7 |
40 |
redbear |
// Agreement, Intel FPGA IP License Agreement, or other applicable
|
| 8 |
32 |
redbear |
// 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 |
40 |
redbear |
// $Id: //acds/rel/17.1std/ip/merlin/altera_merlin_demultiplexer/altera_merlin_demultiplexer.sv.terp#1 $
|
| 15 |
32 |
redbear |
// $Revision: #1 $
|
| 16 |
40 |
redbear |
// $Date: 2017/07/30 $
|
| 17 |
32 |
redbear |
// $Author: swbranch $
|
| 18 |
|
|
|
| 19 |
|
|
// -------------------------------------
|
| 20 |
|
|
// Merlin Demultiplexer
|
| 21 |
|
|
//
|
| 22 |
|
|
// Asserts valid on the appropriate output
|
| 23 |
|
|
// given a one-hot channel signal.
|
| 24 |
|
|
// -------------------------------------
|
| 25 |
|
|
|
| 26 |
|
|
`timescale 1 ns / 1 ns
|
| 27 |
|
|
|
| 28 |
|
|
// ------------------------------------------
|
| 29 |
|
|
// Generation parameters:
|
| 30 |
|
|
// output_name: ulight_fifo_mm_interconnect_0_rsp_demux
|
| 31 |
|
|
// ST_DATA_W: 129
|
| 32 |
|
|
// ST_CHANNEL_W: 22
|
| 33 |
|
|
// NUM_OUTPUTS: 2
|
| 34 |
|
|
// VALID_WIDTH: 1
|
| 35 |
|
|
// ------------------------------------------
|
| 36 |
|
|
|
| 37 |
|
|
//------------------------------------------
|
| 38 |
|
|
// Message Supression Used
|
| 39 |
|
|
// QIS Warnings
|
| 40 |
|
|
// 15610 - Warning: Design contains x input pin(s) that do not drive logic
|
| 41 |
|
|
//------------------------------------------
|
| 42 |
|
|
|
| 43 |
|
|
module ulight_fifo_mm_interconnect_0_rsp_demux
|
| 44 |
|
|
(
|
| 45 |
|
|
// -------------------
|
| 46 |
|
|
// Sink
|
| 47 |
|
|
// -------------------
|
| 48 |
|
|
input [1-1 : 0] sink_valid,
|
| 49 |
|
|
input [129-1 : 0] sink_data, // ST_DATA_W=129
|
| 50 |
|
|
input [22-1 : 0] sink_channel, // ST_CHANNEL_W=22
|
| 51 |
|
|
input sink_startofpacket,
|
| 52 |
|
|
input sink_endofpacket,
|
| 53 |
|
|
output sink_ready,
|
| 54 |
|
|
|
| 55 |
|
|
// -------------------
|
| 56 |
|
|
// Sources
|
| 57 |
|
|
// -------------------
|
| 58 |
|
|
output reg src0_valid,
|
| 59 |
|
|
output reg [129-1 : 0] src0_data, // ST_DATA_W=129
|
| 60 |
|
|
output reg [22-1 : 0] src0_channel, // ST_CHANNEL_W=22
|
| 61 |
|
|
output reg src0_startofpacket,
|
| 62 |
|
|
output reg src0_endofpacket,
|
| 63 |
|
|
input src0_ready,
|
| 64 |
|
|
|
| 65 |
|
|
output reg src1_valid,
|
| 66 |
|
|
output reg [129-1 : 0] src1_data, // ST_DATA_W=129
|
| 67 |
|
|
output reg [22-1 : 0] src1_channel, // ST_CHANNEL_W=22
|
| 68 |
|
|
output reg src1_startofpacket,
|
| 69 |
|
|
output reg src1_endofpacket,
|
| 70 |
|
|
input src1_ready,
|
| 71 |
|
|
|
| 72 |
|
|
|
| 73 |
|
|
// -------------------
|
| 74 |
|
|
// Clock & Reset
|
| 75 |
|
|
// -------------------
|
| 76 |
|
|
(*altera_attribute = "-name MESSAGE_DISABLE 15610" *) // setting message suppression on clk
|
| 77 |
|
|
input clk,
|
| 78 |
|
|
(*altera_attribute = "-name MESSAGE_DISABLE 15610" *) // setting message suppression on reset
|
| 79 |
|
|
input reset
|
| 80 |
|
|
|
| 81 |
|
|
);
|
| 82 |
|
|
|
| 83 |
|
|
localparam NUM_OUTPUTS = 2;
|
| 84 |
|
|
wire [NUM_OUTPUTS - 1 : 0] ready_vector;
|
| 85 |
|
|
|
| 86 |
|
|
// -------------------
|
| 87 |
|
|
// Demux
|
| 88 |
|
|
// -------------------
|
| 89 |
|
|
always @* begin
|
| 90 |
|
|
src0_data = sink_data;
|
| 91 |
|
|
src0_startofpacket = sink_startofpacket;
|
| 92 |
|
|
src0_endofpacket = sink_endofpacket;
|
| 93 |
|
|
src0_channel = sink_channel >> NUM_OUTPUTS;
|
| 94 |
|
|
|
| 95 |
|
|
src0_valid = sink_channel[0] && sink_valid;
|
| 96 |
|
|
|
| 97 |
|
|
src1_data = sink_data;
|
| 98 |
|
|
src1_startofpacket = sink_startofpacket;
|
| 99 |
|
|
src1_endofpacket = sink_endofpacket;
|
| 100 |
|
|
src1_channel = sink_channel >> NUM_OUTPUTS;
|
| 101 |
|
|
|
| 102 |
|
|
src1_valid = sink_channel[1] && sink_valid;
|
| 103 |
|
|
|
| 104 |
|
|
end
|
| 105 |
|
|
|
| 106 |
|
|
// -------------------
|
| 107 |
|
|
// Backpressure
|
| 108 |
|
|
// -------------------
|
| 109 |
|
|
assign ready_vector[0] = src0_ready;
|
| 110 |
|
|
assign ready_vector[1] = src1_ready;
|
| 111 |
|
|
|
| 112 |
|
|
assign sink_ready = |(sink_channel & {{20{1'b0}},{ready_vector[NUM_OUTPUTS - 1 : 0]}});
|
| 113 |
|
|
|
| 114 |
|
|
endmodule
|
| 115 |
|
|
|