W
Weng Tianxiang
Guest
Hi,
A wive-pipelined circuit has the same logic as its pipeline counterpart except that the wive-pipelined circuit has only one stage, a critical path from the input register passing through a piece of computational logic to the output register, and no intermediate registers.
My invention kernel idea is: A designer provides the least information and logic code about the critical path, and leave all complex logic designs to a synthesizer and a system library that is what an HDL should do.
All coding has 3 steps:
1. Write a Critical Path Component (CPC) with defined interface;
2. Call a Wave-Pipelining Component (WPC) provided by a system library;
3. Call one of 3 link statement to link a CPC instantiation with a paired WPC instantiation to specify what your target is.
Here is the all code on a 64*64 bits signed integer multiplier C <= A*B.
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.wave_pipeline_package.all;
-- CPC code for wave-pipelined 64-bit signed integer multiplier C <= A*B
-- CPC_1_2 is linked with SMB by link1() / link2() if "wave" is accepted in VHDL
-- link1(): generation would fail if the circuit cannot accept 1 data per cycle
-- link2(): generation never fails and the circuit is capable of accepting 1 data per
-- INPUT_CLOCK_NUMBER cycles
entity CPC_1_2 is
generic (
input_data_width : positive := 64; -- optional
output_data_width : positive := 128 -- optional
);
port (
CLK : in std_logic;
WE_i : in std_logic; -- '1': write enable to input registers A & B
Da_i : in signed(input_data_width-1 downto 0); -- input data A
Db_i : in signed(input_data_width-1 downto 0); -- input data B
WE_o_i: in std_logic; -- '1': write enable to output register C
Dc_o : out unsigned(output_data_width -1 downto 0) -- output data C
);
end CPC_1_2;
architecture A_CPC_1_2 of CPC_1_2 is
signal Ra : signed(input_data_width-1 downto 0); -- input register A
signal Rb : signed(input_data_width-1 downto 0); -- input register B
signal Rc : signed(output_data_width-1 downto 0); -- output register C
signal Cl : signed(output_data_width-1 downto 0); -- combinational logic
begin
Cl <= Ra * Rb; -- combinational logic output, key part of CPC
Dc_o <= unsigned(Rc); -- output through output register
p_1 : process(CLK)
begin
if Rising_edge(CLK) then
if WE_i = '1' then -- WE_i = '1' : latch input data
Ra <= Da_i;
Rb <= Db_i;
end if;
if WE_O_I = '1' then -- WE_O_I = '1': latch output data
Rc <= Cl;
end if;
end if;
end process;
--------------------------------------------------------------------------------
end A_CPC_1_2;
In summary, after HDL adopting my system, writing a wave-pipelined circuit is simple as writing a one-cycle logic circuit.
Thank you.
Weng
A wive-pipelined circuit has the same logic as its pipeline counterpart except that the wive-pipelined circuit has only one stage, a critical path from the input register passing through a piece of computational logic to the output register, and no intermediate registers.
My invention kernel idea is: A designer provides the least information and logic code about the critical path, and leave all complex logic designs to a synthesizer and a system library that is what an HDL should do.
All coding has 3 steps:
1. Write a Critical Path Component (CPC) with defined interface;
2. Call a Wave-Pipelining Component (WPC) provided by a system library;
3. Call one of 3 link statement to link a CPC instantiation with a paired WPC instantiation to specify what your target is.
Here is the all code on a 64*64 bits signed integer multiplier C <= A*B.
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.wave_pipeline_package.all;
-- CPC code for wave-pipelined 64-bit signed integer multiplier C <= A*B
-- CPC_1_2 is linked with SMB by link1() / link2() if "wave" is accepted in VHDL
-- link1(): generation would fail if the circuit cannot accept 1 data per cycle
-- link2(): generation never fails and the circuit is capable of accepting 1 data per
-- INPUT_CLOCK_NUMBER cycles
entity CPC_1_2 is
generic (
input_data_width : positive := 64; -- optional
output_data_width : positive := 128 -- optional
);
port (
CLK : in std_logic;
WE_i : in std_logic; -- '1': write enable to input registers A & B
Da_i : in signed(input_data_width-1 downto 0); -- input data A
Db_i : in signed(input_data_width-1 downto 0); -- input data B
WE_o_i: in std_logic; -- '1': write enable to output register C
Dc_o : out unsigned(output_data_width -1 downto 0) -- output data C
);
end CPC_1_2;
architecture A_CPC_1_2 of CPC_1_2 is
signal Ra : signed(input_data_width-1 downto 0); -- input register A
signal Rb : signed(input_data_width-1 downto 0); -- input register B
signal Rc : signed(output_data_width-1 downto 0); -- output register C
signal Cl : signed(output_data_width-1 downto 0); -- combinational logic
begin
Cl <= Ra * Rb; -- combinational logic output, key part of CPC
Dc_o <= unsigned(Rc); -- output through output register
p_1 : process(CLK)
begin
if Rising_edge(CLK) then
if WE_i = '1' then -- WE_i = '1' : latch input data
Ra <= Da_i;
Rb <= Db_i;
end if;
if WE_O_I = '1' then -- WE_O_I = '1': latch output data
Rc <= Cl;
end if;
end if;
end process;
--------------------------------------------------------------------------------
end A_CPC_1_2;
In summary, after HDL adopting my system, writing a wave-pipelined circuit is simple as writing a one-cycle logic circuit.
Thank you.
Weng