// mult_controller.v
// Ordinary signed multiplier controller, pin compatible with DKCM version
// $Id$
// Larry Doolittle, LBNL
// llc-suite Copyright (c) 2004, The Regents of the University of
// California, through Lawrence Berkeley National Laboratory (subject
// to receipt of any required approvals from the U.S. Dept. of Energy).
// All rights reserved.
// Your use of this software is pursuant to a "BSD-style" open
// source license agreement, the text of which is in license.txt
// (md5sum a1e0e81c78f6eba050b0e96996f49fd5) that should accompany
// this file. If the license agreement is not there, or if you
// have questions about the license, please contact Berkeley Lab's
// Technology Transfer Department at TTD@lbl.gov referring to
// "llc-suite (LBNL Ref CR-1988)"
`timescale 1ns / 1ns
module dkcm_controller
(
input host_clk, // interconnect
input [13:0] host_addr, // interconnect
input host_we, // interconnect
input select, // select KCM_BASE
input [15:0] host_data, // interconnect
output dkcm_busy, // interconnect
output [21:0] dkcm_bus // interconnect
);
wire load = host_we & select;
assign dkcm_busy = load; // strange, but needed to keep test bench happy
reg load_last;
always @(posedge host_clk) load_last <= load;
wire corrupt = load | load_last;
assign dkcm_bus = {corrupt, host_data, host_addr[2:0], 1'b0, load};
endmodule