Commit fa8df2bb authored by Dimitris Lampridis's avatar Dimitris Lampridis

Clean-up non-ASCII characters and fix line feeds and terminations in all affected files

parent 284373b7
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
@titlepage @titlepage
@title @code{general-cores} VHDL library @title @code{general-cores} VHDL library
@subtitle Programmer's manual @subtitle Programmer's manual
@author CERN BE-CO-HT / Tomasz Włostowski @author CERN BE-CO-HT / Tomasz Wlostowski
@end titlepage @end titlepage
@headings single @headings single
......
This diff is collapsed.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- Author : Tomasz Wlostowski -- Author : Tomasz Wlostowski
-- Company : CERN -- Company : CERN
-- Created : 2011-08-24 -- Created : 2011-08-24
-- Last update: 2012-02-21 -- Last update: 2019-09-09
-- Platform : FPGA-generic -- Platform : FPGA-generic
-- Standard : VHDL'93 -- Standard : VHDL'93
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
-- Copyright (c) 2011 CERN / BE-CO-HT -- Copyright (c) 2011 CERN / BE-CO-HT
-- --
-- Copyright and related rights are licensed under the Solderpad Hardware -- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 0.51 (the “License”) (which enables you, at your option, -- License, Version 0.51 (the "License") (which enables you, at your option,
-- to treat this file as licensed under the Apache License 2.0); you may not -- to treat this file as licensed under the Apache License 2.0); you may not
-- use this file except in compliance with the License. You may obtain a copy -- use this file except in compliance with the License. You may obtain a copy
-- of the License at http://solderpad.org/licenses/SHL-0.51. -- of the License at http://solderpad.org/licenses/SHL-0.51.
-- Unless required by applicable law or agreed to in writing, software, -- Unless required by applicable law or agreed to in writing, software,
-- hardware and materials distributed under this License is distributed on an -- hardware and materials distributed under this License is distributed on an
-- “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-- or implied. See the License for the specific language governing permissions -- or implied. See the License for the specific language governing permissions
-- and limitations under the License. -- and limitations under the License.
-- --
......
...@@ -34,13 +34,13 @@ ...@@ -34,13 +34,13 @@
-- Copyright (c) 2016 CERN/TE-MS-MM -- Copyright (c) 2016 CERN/TE-MS-MM
-- --
-- Copyright and related rights are licensed under the Solderpad Hardware -- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 0.51 (the “License”) (which enables you, at your option, -- License, Version 0.51 (the "License") (which enables you, at your option,
-- to treat this file as licensed under the Apache License 2.0); you may not -- to treat this file as licensed under the Apache License 2.0); you may not
-- use this file except in compliance with the License. You may obtain a copy -- use this file except in compliance with the License. You may obtain a copy
-- of the License at http://solderpad.org/licenses/SHL-0.51. -- of the License at http://solderpad.org/licenses/SHL-0.51.
-- Unless required by applicable law or agreed to in writing, software, -- Unless required by applicable law or agreed to in writing, software,
-- hardware and materials distributed under this License is distributed on an -- hardware and materials distributed under this License is distributed on an
-- “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-- or implied. See the License for the specific language governing permissions -- or implied. See the License for the specific language governing permissions
-- and limitations under the License. -- and limitations under the License.
-- --
......
...@@ -49,13 +49,13 @@ ...@@ -49,13 +49,13 @@
-- Copyright (c) 2012 - 2017 CERN -- Copyright (c) 2012 - 2017 CERN
-- --
-- Copyright and related rights are licensed under the Solderpad Hardware -- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 0.51 (the “License”) (which enables you, at your option, -- License, Version 0.51 (the "License") (which enables you, at your option,
-- to treat this file as licensed under the Apache License 2.0); you may not -- to treat this file as licensed under the Apache License 2.0); you may not
-- use this file except in compliance with the License. You may obtain a copy -- use this file except in compliance with the License. You may obtain a copy
-- of the License at http://solderpad.org/licenses/SHL-0.51. -- of the License at http://solderpad.org/licenses/SHL-0.51.
-- Unless required by applicable law or agreed to in writing, software, -- Unless required by applicable law or agreed to in writing, software,
-- hardware and materials distributed under this License is distributed on an -- hardware and materials distributed under this License is distributed on an
-- “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-- or implied. See the License for the specific language governing permissions -- or implied. See the License for the specific language governing permissions
-- and limitations under the License. -- and limitations under the License.
-- --
......
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
-- Copyright (c) 2009-2011 CERN -- Copyright (c) 2009-2011 CERN
-- --
-- Copyright and related rights are licensed under the Solderpad Hardware -- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 0.51 (the “License”) (which enables you, at your option, -- License, Version 0.51 (the "License") (which enables you, at your option,
-- to treat this file as licensed under the Apache License 2.0); you may not -- to treat this file as licensed under the Apache License 2.0); you may not
-- use this file except in compliance with the License. You may obtain a copy -- use this file except in compliance with the License. You may obtain a copy
-- of the License at http://solderpad.org/licenses/SHL-0.51. -- of the License at http://solderpad.org/licenses/SHL-0.51.
-- Unless required by applicable law or agreed to in writing, software, -- Unless required by applicable law or agreed to in writing, software,
-- hardware and materials distributed under this License is distributed on an -- hardware and materials distributed under this License is distributed on an
-- “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-- or implied. See the License for the specific language governing permissions -- or implied. See the License for the specific language governing permissions
-- and limitations under the License. -- and limitations under the License.
-- --
......
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
-- Copyright (c) 2012-2017 CERN -- Copyright (c) 2012-2017 CERN
-- --
-- Copyright and related rights are licensed under the Solderpad Hardware -- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 0.51 (the “License”) (which enables you, at your option, -- License, Version 0.51 (the "License") (which enables you, at your option,
-- to treat this file as licensed under the Apache License 2.0); you may not -- to treat this file as licensed under the Apache License 2.0); you may not
-- use this file except in compliance with the License. You may obtain a copy -- use this file except in compliance with the License. You may obtain a copy
-- of the License at http://solderpad.org/licenses/SHL-0.51. -- of the License at http://solderpad.org/licenses/SHL-0.51.
-- Unless required by applicable law or agreed to in writing, software, -- Unless required by applicable law or agreed to in writing, software,
-- hardware and materials distributed under this License is distributed on an -- hardware and materials distributed under this License is distributed on an
-- “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-- or implied. See the License for the specific language governing permissions -- or implied. See the License for the specific language governing permissions
-- and limitations under the License. -- and limitations under the License.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- Author : Pablo Alvarez Sanchez -- Author : Pablo Alvarez Sanchez
-- Company : CERN BE-Co-HT -- Company : CERN BE-Co-HT
-- Created : 2010-02-25 -- Created : 2010-02-25
-- Last update: 2011-04-29 -- Last update: 2019-09-09
-- Platform : FPGA-generic -- Platform : FPGA-generic
-- Standard : VHDL '87 -- Standard : VHDL '87
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
-- Copyright (c) 2009 - 2010 CERN -- Copyright (c) 2009 - 2010 CERN
-- --
-- Copyright and related rights are licensed under the Solderpad Hardware -- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 0.51 (the “License”) (which enables you, at your option, -- License, Version 0.51 (the "License") (which enables you, at your option,
-- to treat this file as licensed under the Apache License 2.0); you may not -- to treat this file as licensed under the Apache License 2.0); you may not
-- use this file except in compliance with the License. You may obtain a copy -- use this file except in compliance with the License. You may obtain a copy
-- of the License at http://solderpad.org/licenses/SHL-0.51. -- of the License at http://solderpad.org/licenses/SHL-0.51.
-- Unless required by applicable law or agreed to in writing, software, -- Unless required by applicable law or agreed to in writing, software,
-- hardware and materials distributed under this License is distributed on an -- hardware and materials distributed under this License is distributed on an
-- “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-- or implied. See the License for the specific language governing permissions -- or implied. See the License for the specific language governing permissions
-- and limitations under the License. -- and limitations under the License.
-- --
......
...@@ -21,13 +21,13 @@ ...@@ -21,13 +21,13 @@
-- Copyright (c) 2011 CERN -- Copyright (c) 2011 CERN
-- --
-- Copyright and related rights are licensed under the Solderpad Hardware -- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 0.51 (the “License”) (which enables you, at your option, -- License, Version 0.51 (the "License") (which enables you, at your option,
-- to treat this file as licensed under the Apache License 2.0); you may not -- to treat this file as licensed under the Apache License 2.0); you may not
-- use this file except in compliance with the License. You may obtain a copy -- use this file except in compliance with the License. You may obtain a copy
-- of the License at http://solderpad.org/licenses/SHL-0.51. -- of the License at http://solderpad.org/licenses/SHL-0.51.
-- Unless required by applicable law or agreed to in writing, software, -- Unless required by applicable law or agreed to in writing, software,
-- hardware and materials distributed under this License is distributed on an -- hardware and materials distributed under this License is distributed on an
-- “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-- or implied. See the License for the specific language governing permissions -- or implied. See the License for the specific language governing permissions
-- and limitations under the License. -- and limitations under the License.
-- --
......
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- Title : AXI4Lite-to-WB bridge -- Title : AXI4Lite-to-WB bridge
-- Project : General Cores -- Project : General Cores
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- File : wb_axi4lite_bridge.vhd -- File : wb_axi4lite_bridge.vhd
-- Author : Tomasz Wlostowski -- Author : Tomasz Wlostowski
-- Company : CERN -- Company : CERN
-- Platform : FPGA-generics -- Platform : FPGA-generics
-- Standard : VHDL '93 -- Standard : VHDL '93
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- Copyright (c) 2017 CERN -- Copyright (c) 2017 CERN
-- --
-- Copyright and related rights are licensed under the Solderpad Hardware -- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 0.51 (the “License”) (which enables you, at your option, -- License, Version 0.51 (the "License") (which enables you, at your option,
-- to treat this file as licensed under the Apache License 2.0); you may not -- to treat this file as licensed under the Apache License 2.0); you may not
-- use this file except in compliance with the License. You may obtain a copy -- use this file except in compliance with the License. You may obtain a copy
-- of the License at http://solderpad.org/licenses/SHL-0.51. -- of the License at http://solderpad.org/licenses/SHL-0.51.
-- Unless required by applicable law or agreed to in writing, software, -- Unless required by applicable law or agreed to in writing, software,
-- hardware and materials distributed under this License is distributed on an -- hardware and materials distributed under this License is distributed on an
-- “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-- or implied. See the License for the specific language governing permissions -- or implied. See the License for the specific language governing permissions
-- and limitations under the License. -- and limitations under the License.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
library ieee; library ieee;
use ieee.std_logic_1164.all; use ieee.std_logic_1164.all;
use ieee.numeric_std.all; use ieee.numeric_std.all;
use work.axi4_pkg.all; use work.axi4_pkg.all;
use work.wishbone_pkg.all; use work.wishbone_pkg.all;
entity wb_axi4lite_bridge is entity wb_axi4lite_bridge is
port ( port (
clk_sys_i : in std_logic; clk_sys_i : in std_logic;
rst_n_i : in std_logic; rst_n_i : in std_logic;
ARVALID : in std_logic; ARVALID : in std_logic;
AWVALID : in std_logic; AWVALID : in std_logic;
BREADY : in std_logic; BREADY : in std_logic;
RREADY : in std_logic; RREADY : in std_logic;
WLAST : in std_logic; WLAST : in std_logic;
WVALID : in std_logic; WVALID : in std_logic;
ARADDR : in std_logic_vector (31 downto 0); ARADDR : in std_logic_vector (31 downto 0);
AWADDR : in std_logic_vector (31 downto 0); AWADDR : in std_logic_vector (31 downto 0);
WDATA : in std_logic_vector (31 downto 0); WDATA : in std_logic_vector (31 downto 0);
WSTRB : in std_logic_vector (3 downto 0); WSTRB : in std_logic_vector (3 downto 0);
ARREADY : out std_logic; ARREADY : out std_logic;
AWREADY : out std_logic; AWREADY : out std_logic;
BVALID : out std_logic; BVALID : out std_logic;
RLAST : out std_logic; RLAST : out std_logic;
RVALID : out std_logic; RVALID : out std_logic;
WREADY : out std_logic; WREADY : out std_logic;
BRESP : out std_logic_vector (1 downto 0); BRESP : out std_logic_vector (1 downto 0);
RRESP : out std_logic_vector (1 downto 0); RRESP : out std_logic_vector (1 downto 0);
RDATA : out std_logic_vector (31 downto 0); RDATA : out std_logic_vector (31 downto 0);
wb_adr : out std_logic_vector(c_wishbone_address_width-1 downto 0); wb_adr : out std_logic_vector(c_wishbone_address_width-1 downto 0);
wb_dat_m2s : out std_logic_vector(c_wishbone_data_width-1 downto 0); wb_dat_m2s : out std_logic_vector(c_wishbone_data_width-1 downto 0);
wb_sel : out std_logic_vector(c_wishbone_data_width/8-1 downto 0); wb_sel : out std_logic_vector(c_wishbone_data_width/8-1 downto 0);
wb_cyc : out std_logic; wb_cyc : out std_logic;
wb_stb : out std_logic; wb_stb : out std_logic;
wb_we : out std_logic; wb_we : out std_logic;
wb_dat_s2m : in std_logic_vector(c_wishbone_data_width-1 downto 0); wb_dat_s2m : in std_logic_vector(c_wishbone_data_width-1 downto 0);
wb_err : in std_logic := '0'; wb_err : in std_logic := '0';
wb_rty : in std_logic := '0'; wb_rty : in std_logic := '0';
wb_ack : in std_logic; wb_ack : in std_logic;
wb_stall : in std_logic wb_stall : in std_logic
); );
end wb_axi4lite_bridge; end wb_axi4lite_bridge;
architecture rtl of wb_axi4lite_bridge is architecture rtl of wb_axi4lite_bridge is
signal axi_in : t_axi4_lite_master_out_32; signal axi_in : t_axi4_lite_master_out_32;
signal axi_out : t_axi4_lite_master_in_32; signal axi_out : t_axi4_lite_master_in_32;
signal wb_in : t_wishbone_master_in; signal wb_in : t_wishbone_master_in;
signal wb_out : t_wishbone_master_out; signal wb_out : t_wishbone_master_out;
begin begin
axi_in.ARVALID <= ARVALID; axi_in.ARVALID <= ARVALID;
axi_in.AWVALID <= AWVALID; axi_in.AWVALID <= AWVALID;
axi_in.BREADY <= BREADY; axi_in.BREADY <= BREADY;
axi_in.RREADY <= RREADY; axi_in.RREADY <= RREADY;
axi_in.WLAST <= WLAST; axi_in.WLAST <= WLAST;
axi_in.WVALID <= WVALID; axi_in.WVALID <= WVALID;
axi_in.ARADDR <= ARADDR; axi_in.ARADDR <= ARADDR;
axi_in.AWADDR <= AWADDR; axi_in.AWADDR <= AWADDR;
axi_in.WDATA <= WDATA; axi_in.WDATA <= WDATA;
axi_in.WSTRB <= WSTRB; axi_in.WSTRB <= WSTRB;
ARREADY <= axi_out.ARREADY; ARREADY <= axi_out.ARREADY;
AWREADY <= axi_out.AWREADY; AWREADY <= axi_out.AWREADY;
BVALID <= axi_out.BVALID; BVALID <= axi_out.BVALID;
RLAST <= axi_out.RLAST; RLAST <= axi_out.RLAST;
RVALID <= axi_out.RVALID; RVALID <= axi_out.RVALID;
WREADY <= axi_out.WREADY; WREADY <= axi_out.WREADY;
BRESP <= axi_out.BRESP; BRESP <= axi_out.BRESP;
RRESP <= axi_out.RRESP; RRESP <= axi_out.RRESP;
RDATA <= axi_out.RDATA; RDATA <= axi_out.RDATA;
wb_adr <= wb_out.adr; wb_adr <= wb_out.adr;
wb_dat_m2s <= wb_out.dat; wb_dat_m2s <= wb_out.dat;
wb_stb <= wb_out.stb; wb_stb <= wb_out.stb;
wb_sel <= wb_out.sel; wb_sel <= wb_out.sel;
wb_cyc <= wb_out.cyc; wb_cyc <= wb_out.cyc;
wb_we <= wb_out.we; wb_we <= wb_out.we;
wb_in.err <= wb_err; wb_in.err <= wb_err;
wb_in.rty <= wb_rty; wb_in.rty <= wb_rty;
wb_in.ack <= wb_ack; wb_in.ack <= wb_ack;
wb_in.stall <= wb_stall; wb_in.stall <= wb_stall;
wb_in.dat <= wb_dat_s2m; wb_in.dat <= wb_dat_s2m;
U_Wrapped_Bridge : xwb_axi4lite_bridge U_Wrapped_Bridge : xwb_axi4lite_bridge
port map ( port map (
clk_sys_i => clk_sys_i, clk_sys_i => clk_sys_i,
rst_n_i => rst_n_i, rst_n_i => rst_n_i,
axi4_slave_i => axi_in, axi4_slave_i => axi_in,
axi4_slave_o => axi_out, axi4_slave_o => axi_out,
wb_master_o => wb_out, wb_master_o => wb_out,
wb_master_i => wb_in); wb_master_i => wb_in);
end rtl; end rtl;
This diff is collapsed.
module jtag_tap( module jtag_tap(
output tck, output tck,
output tdi, output tdi,
input tdo, input tdo,
output capture, output capture,
output shift, output shift,
output e1dr, output e1dr,
output update, output update,
output reset output reset
); );
// Unfortunately the exit1 state for DR (e1dr) is mising // Unfortunately the exit1 state for DR (e1dr) is mising
// We can simulate it by interpretting 'update' as e1dr and delaying 'update' // We can simulate it by interpretting 'update' as e1dr and delaying 'update'
wire sel; wire sel;
wire g_capture; wire g_capture;
wire g_shift; wire g_shift;
wire g_update; wire g_update;
reg update_delay; reg update_delay;
assign capture = g_capture & sel; assign capture = g_capture & sel;
assign shift = g_shift & sel; assign shift = g_shift & sel;
assign e1dr = g_update & sel; assign e1dr = g_update & sel;
assign update = update_delay; assign update = update_delay;
BSCANE2 #( BSCANE2 #(
.JTAG_CHAIN(1) .JTAG_CHAIN(1)
) bscan ( ) bscan (
.CAPTURE(g_capture), .CAPTURE(g_capture),
.DRCK(tck), .DRCK(tck),
.RESET(reset), .RESET(reset),
.RUNTEST(), .RUNTEST(),
.SEL(sel), .SEL(sel),
.SHIFT(g_shift), .SHIFT(g_shift),
.TCK(), .TCK(),
.TDI(tdi), .TDI(tdi),
.TMS(), .TMS(),
.UPDATE(g_update), .UPDATE(g_update),
.TDO(tdo) .TDO(tdo)
); );
always@(posedge tck) always@(posedge tck)
update_delay <= g_update; update_delay <= g_update;
endmodule endmodule
// ============================================================================= // =============================================================================
// COPYRIGHT NOTICE // COPYRIGHT NOTICE
// Copyright 2006 (c) Lattice Semiconductor Corporation // Copyright 2006 (c) Lattice Semiconductor Corporation
// ALL RIGHTS RESERVED // ALL RIGHTS RESERVED
// This confidential and proprietary software may be used only as authorised by // This confidential and proprietary software may be used only as authorised by
// a licensing agreement from Lattice Semiconductor Corporation. // a licensing agreement from Lattice Semiconductor Corporation.
// The entire notice above must be reproduced on all authorized copies and // The entire notice above must be reproduced on all authorized copies and
// copies may only be made to the extent permitted by a licensing agreement from // copies may only be made to the extent permitted by a licensing agreement from
// Lattice Semiconductor Corporation. // Lattice Semiconductor Corporation.
// //
// Lattice Semiconductor Corporation TEL : 1-800-Lattice (USA and Canada) // Lattice Semiconductor Corporation TEL : 1-800-Lattice (USA and Canada)
// 5555 NE Moore Court 408-826-6000 (other locations) // 5555 NE Moore Court 408-826-6000 (other locations)
// Hillsboro, OR 97124 web : http://www.latticesemi.com/ // Hillsboro, OR 97124 web : http://www.latticesemi.com/
// U.S.A email: techsupport@latticesemi.com // U.S.A email: techsupport@latticesemi.com
// =============================================================================/ // =============================================================================/
// FILE DETAILS // FILE DETAILS
// Project : LatticeMico32 // Project : LatticeMico32
// File : lm32_multiplier.v // File : lm32_multiplier.v
// Title : Pipelined multiplier. // Title : Pipelined multiplier.
// Dependencies : lm32_include.v // Dependencies : lm32_include.v
// Version : 6.1.17 // Version : 6.1.17
// : Initial Release // : Initial Release
// Version : 7.0SP2, 3.0 // Version : 7.0SP2, 3.0
// : No Change // : No Change
// Version : 3.1 // Version : 3.1
// : No Change // : No Change
// ============================================================================= // =============================================================================
`include "../../src/lm32_include.v" `include "../../src/lm32_include.v"
//`include "lm32_include.v" //`include "lm32_include.v"
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
// Module interface // Module interface
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
module lm32_multiplier ( module lm32_multiplier (
// ----- Inputs ----- // ----- Inputs -----
clk_i, clk_i,
rst_i, rst_i,
stall_x, stall_x,
stall_m, stall_m,
operand_0, operand_0,
operand_1, operand_1,
// ----- Ouputs ----- // ----- Ouputs -----
result result
); );
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
// Inputs // Inputs
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
input clk_i; // Clock input clk_i; // Clock
input rst_i; // Reset input rst_i; // Reset
input stall_x; // Stall instruction in X stage input stall_x; // Stall instruction in X stage
input stall_m; // Stall instruction in M stage input stall_m; // Stall instruction in M stage
input [`LM32_WORD_RNG] operand_0; // Muliplicand input [`LM32_WORD_RNG] operand_0; // Muliplicand
input [`LM32_WORD_RNG] operand_1; // Multiplier input [`LM32_WORD_RNG] operand_1; // Multiplier
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
// Outputs // Outputs
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
output [`LM32_WORD_RNG] result; // Product of multiplication output [`LM32_WORD_RNG] result; // Product of multiplication
wire [`LM32_WORD_RNG] result; wire [`LM32_WORD_RNG] result;
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
// Internal nets and registers // Internal nets and registers
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
// Divide multiplicands into high and low // Divide multiplicands into high and low
`define HALF_WORD_WIDTH (`LM32_WORD_WIDTH/2) `define HALF_WORD_WIDTH (`LM32_WORD_WIDTH/2)
`define HALF_WORD_RNG (`HALF_WORD_WIDTH-1):0 `define HALF_WORD_RNG (`HALF_WORD_WIDTH-1):0
// Result = c+d+e = a*b // Result = c+d+e = a*b
reg [`HALF_WORD_RNG] a0, a1, b0, b1; reg [`HALF_WORD_RNG] a0, a1, b0, b1;
reg [`HALF_WORD_RNG] c0, c1; reg [`HALF_WORD_RNG] c0, c1;
reg [`HALF_WORD_RNG] d1, e1; reg [`HALF_WORD_RNG] d1, e1;
reg [`HALF_WORD_RNG] result0, result1; reg [`HALF_WORD_RNG] result0, result1;
assign result = {result1, result0}; assign result = {result1, result0};
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
// Sequential logic // Sequential logic
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
always @(posedge clk_i `CFG_RESET_SENSITIVITY) always @(posedge clk_i `CFG_RESET_SENSITIVITY)
begin begin
if (rst_i == `TRUE) if (rst_i == `TRUE)
begin begin
a0 <= {`HALF_WORD_WIDTH{1'b0}}; a0 <= {`HALF_WORD_WIDTH{1'b0}};
a1 <= {`HALF_WORD_WIDTH{1'b0}}; a1 <= {`HALF_WORD_WIDTH{1'b0}};
b0 <= {`HALF_WORD_WIDTH{1'b0}}; b0 <= {`HALF_WORD_WIDTH{1'b0}};
b1 <= {`HALF_WORD_WIDTH{1'b0}}; b1 <= {`HALF_WORD_WIDTH{1'b0}};
c0 <= {`HALF_WORD_WIDTH{1'b0}}; c0 <= {`HALF_WORD_WIDTH{1'b0}};
c1 <= {`HALF_WORD_WIDTH{1'b0}}; c1 <= {`HALF_WORD_WIDTH{1'b0}};
d1 <= {`HALF_WORD_WIDTH{1'b0}}; d1 <= {`HALF_WORD_WIDTH{1'b0}};
e1 <= {`HALF_WORD_WIDTH{1'b0}}; e1 <= {`HALF_WORD_WIDTH{1'b0}};
result0 <= {`HALF_WORD_WIDTH{1'b0}}; result0 <= {`HALF_WORD_WIDTH{1'b0}};
result1 <= {`HALF_WORD_WIDTH{1'b0}}; result1 <= {`HALF_WORD_WIDTH{1'b0}};
end end
else else
begin begin
if (stall_x == `FALSE) if (stall_x == `FALSE)
begin begin
{a1, a0} <= operand_0; {a1, a0} <= operand_0;
{b1, b0} <= operand_1; {b1, b0} <= operand_1;
end end
if (stall_m == `FALSE) if (stall_m == `FALSE)
begin begin
{c1, c0} <= a0 * b0; {c1, c0} <= a0 * b0;
d1 <= a0 * b1; d1 <= a0 * b1;
e1 <= a1 * b0; e1 <= a1 * b0;
end end
result0 <= c0; result0 <= c0;
result1 <= c1 + d1 + e1; result1 <= c1 + d1 + e1;
end end
end end
endmodule endmodule
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
-- Project : General Cores Collection -- Project : General Cores Collection
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- File : simple_pwm_wb.wb -- File : simple_pwm_wb.wb
-- Author : Tomasz Włostowski -- Author : Tomasz Wlostowski
-- Company : CERN BE-CO-HT -- Company : CERN BE-CO-HT
-- Created : 2012-12-10 -- Created : 2012-12-10
-- Last update: 2013-01-09 -- Last update: 2013-01-09
......
files = ["wb_tics.vhd", "xwb_tics.vhd"]; files = ["wb_tics.vhd", "xwb_tics.vhd"];
\ No newline at end of file
This diff is collapsed.
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
-- Copyright (c) 2011 CERN -- Copyright (c) 2011 CERN
-- --
-- Copyright and related rights are licensed under the Solderpad Hardware -- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 0.51 (the “License”) (which enables you, at your option, -- License, Version 0.51 (the "License") (which enables you, at your option,
-- to treat this file as licensed under the Apache License 2.0); you may not -- to treat this file as licensed under the Apache License 2.0); you may not
-- use this file except in compliance with the License. You may obtain a copy -- use this file except in compliance with the License. You may obtain a copy
-- of the License at http://solderpad.org/licenses/SHL-0.51. -- of the License at http://solderpad.org/licenses/SHL-0.51.
-- Unless required by applicable law or agreed to in writing, software, -- Unless required by applicable law or agreed to in writing, software,
-- hardware and materials distributed under this License is distributed on an -- hardware and materials distributed under this License is distributed on an
-- “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-- or implied. See the License for the specific language governing permissions -- or implied. See the License for the specific language governing permissions
-- and limitations under the License. -- and limitations under the License.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
-- Copyright (c) 2011 CERN -- Copyright (c) 2011 CERN
-- --
-- Copyright and related rights are licensed under the Solderpad Hardware -- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 0.51 (the “License”) (which enables you, at your option, -- License, Version 0.51 (the "License") (which enables you, at your option,
-- to treat this file as licensed under the Apache License 2.0); you may not -- to treat this file as licensed under the Apache License 2.0); you may not
-- use this file except in compliance with the License. You may obtain a copy -- use this file except in compliance with the License. You may obtain a copy
-- of the License at http://solderpad.org/licenses/SHL-0.51. -- of the License at http://solderpad.org/licenses/SHL-0.51.
-- Unless required by applicable law or agreed to in writing, software, -- Unless required by applicable law or agreed to in writing, software,
-- hardware and materials distributed under this License is distributed on an -- hardware and materials distributed under this License is distributed on an
-- “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-- or implied. See the License for the specific language governing permissions -- or implied. See the License for the specific language governing permissions
-- and limitations under the License. -- and limitations under the License.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
-- Copyright (c) 2011 CERN -- Copyright (c) 2011 CERN
-- --
-- Copyright and related rights are licensed under the Solderpad Hardware -- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 0.51 (the “License”) (which enables you, at your option, -- License, Version 0.51 (the "License") (which enables you, at your option,
-- to treat this file as licensed under the Apache License 2.0); you may not -- to treat this file as licensed under the Apache License 2.0); you may not
-- use this file except in compliance with the License. You may obtain a copy -- use this file except in compliance with the License. You may obtain a copy
-- of the License at http://solderpad.org/licenses/SHL-0.51. -- of the License at http://solderpad.org/licenses/SHL-0.51.
-- Unless required by applicable law or agreed to in writing, software, -- Unless required by applicable law or agreed to in writing, software,
-- hardware and materials distributed under this License is distributed on an -- hardware and materials distributed under this License is distributed on an
-- “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-- or implied. See the License for the specific language governing permissions -- or implied. See the License for the specific language governing permissions
-- and limitations under the License. -- and limitations under the License.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
-- Copyright (c) 2011 CERN -- Copyright (c) 2011 CERN
-- --
-- Copyright and related rights are licensed under the Solderpad Hardware -- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 0.51 (the “License”) (which enables you, at your option, -- License, Version 0.51 (the "License") (which enables you, at your option,
-- to treat this file as licensed under the Apache License 2.0); you may not -- to treat this file as licensed under the Apache License 2.0); you may not
-- use this file except in compliance with the License. You may obtain a copy -- use this file except in compliance with the License. You may obtain a copy
-- of the License at http://solderpad.org/licenses/SHL-0.51. -- of the License at http://solderpad.org/licenses/SHL-0.51.
-- Unless required by applicable law or agreed to in writing, software, -- Unless required by applicable law or agreed to in writing, software,
-- hardware and materials distributed under this License is distributed on an -- hardware and materials distributed under this License is distributed on an
-- “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-- or implied. See the License for the specific language governing permissions -- or implied. See the License for the specific language governing permissions
-- and limitations under the License. -- and limitations under the License.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
-- Project : General Cores Library -- Project : General Cores Library
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- File : wb_xilinx_fpga_loader.vhd -- File : wb_xilinx_fpga_loader.vhd
-- Author : Tomasz Włostowski -- Author : Tomasz Wlostowski
-- Company : CERN BE-CO-HT -- Company : CERN BE-CO-HT
-- Created : 2012-01-30 -- Created : 2012-01-30
-- Last update : 2012-01-30 -- Last update : 2012-01-30
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
-- Project : General Cores Library -- Project : General Cores Library
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- File : xloader_wb.wb -- File : xloader_wb.wb
-- Author : Tomasz Włostowski -- Author : Tomasz Wlostowski
-- Company : CERN BE-CO-HT -- Company : CERN BE-CO-HT
-- Created : 2012-01-30 -- Created : 2012-01-30
-- Last update : 2012-01-30 -- Last update : 2012-01-30
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
-- Project : General Cores Library -- Project : General Cores Library
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- File : xwb_xilinx_fpga_loader.vhd -- File : xwb_xilinx_fpga_loader.vhd
-- Author : Tomasz Włostowski -- Author : Tomasz Wlostowski
-- Company : CERN BE-CO-HT -- Company : CERN BE-CO-HT
-- Created : 2012-01-30 -- Created : 2012-01-30
-- Last update : 2012-01-30 -- Last update : 2012-01-30
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment