1`timescale 1ns / 1ps 2/* 3 * This software is Copyright (c) 2018 Denis Burykin 4 * [denis_burykin yahoo com], [denis-burykin2014 yandex ru] 5 * and it is hereby released to the general public under the following terms: 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted. 8 * 9 */ 10 11// 12// PKT_TYPE_INIT (0x05) typically contain runtime 13// initialization data. 14// Length of 1 byte is currently supported. 15// 16module inpkt_type_init_1b( 17 input CLK, 18 input [7:0] din, 19 input wr_en, 20 output full, 21 22 output reg [7:0] dout = 0, 23 input rd_en, 24 output reg empty = 1 25 //output reg err = 0 26 ); 27 28 assign full = 0; 29 30 always @(posedge CLK) begin 31 if (wr_en & empty) begin 32 dout <= din; 33 empty <= 0; 34 end 35 if (rd_en & ~empty) 36 empty <= 1; 37 end 38 39endmodule 40