- removed GHDL warnings
git-svn-id: http://moon:8086/svn/vhdl/trunk@1404 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -54,14 +54,14 @@ architecture Behavioral of alu is
|
|||||||
|
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
function test_zero(arg : unsigned) return STD_LOGIC is
|
function test_zero(arg : unsigned) return STD_LOGIC is
|
||||||
variable result : STD_LOGIC;
|
variable res : STD_LOGIC;
|
||||||
begin
|
begin
|
||||||
result := '0';
|
res := '0';
|
||||||
for i in arg'range loop
|
for i in arg'range loop
|
||||||
result := result or To_X01(arg(i));
|
res := res or To_X01(arg(i));
|
||||||
end loop;
|
end loop;
|
||||||
|
|
||||||
return not result;
|
return not res;
|
||||||
end test_zero;
|
end test_zero;
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -217,9 +217,9 @@ package cpu_pkg is
|
|||||||
function Instr(opcode : opcode_t) return inst_t;
|
function Instr(opcode : opcode_t) return inst_t;
|
||||||
function Instr(opcode : opcode_t; data : inst_data_t) return inst_t;
|
function Instr(opcode : opcode_t; data : inst_data_t) return inst_t;
|
||||||
function Instr(opcode : opcode_t; data : inst_data_t; reg : integer) return inst_t;
|
function Instr(opcode : opcode_t; data : inst_data_t; reg : integer) return inst_t;
|
||||||
function Instr(opcode : opcode_t; reg_a : integer) return inst_t;
|
function Instr(opcode : opcode_t; reg_ptr_a : integer) return inst_t;
|
||||||
function Instr(opcode : opcode_t; reg_a, reg_b : integer) return inst_t;
|
function Instr(opcode : opcode_t; reg_ptr_a, reg_ptr_b : integer) return inst_t;
|
||||||
function Instr(opcode : opcode_t; reg_a, reg_b, reg_c : integer) return inst_t;
|
function Instr(opcode : opcode_t; reg_ptr_a, reg_ptr_b, reg_ptr_c : integer) return inst_t;
|
||||||
function ctrl_lines_default return ctrl_lines_t;
|
function ctrl_lines_default return ctrl_lines_t;
|
||||||
function idecoder(instr_name : instr_name_t; iphase : iphase_t; status : cpu_status_t) return ctrl_lines_t;
|
function idecoder(instr_name : instr_name_t; iphase : iphase_t; status : cpu_status_t) return ctrl_lines_t;
|
||||||
function idecoder(opcode : opcode_t; iphase : iphase_t; status : cpu_status_t) return ctrl_lines_t;
|
function idecoder(opcode : opcode_t; iphase : iphase_t; status : cpu_status_t) return ctrl_lines_t;
|
||||||
@@ -260,34 +260,34 @@ package body cpu_pkg is
|
|||||||
|
|
||||||
end Instr;
|
end Instr;
|
||||||
|
|
||||||
function Instr(opcode : opcode_t; reg_a : integer) return inst_t is
|
function Instr(opcode : opcode_t; reg_ptr_a : integer) return inst_t is
|
||||||
variable inst : inst_t := (others => '0');
|
variable inst : inst_t := (others => '0');
|
||||||
begin
|
begin
|
||||||
inst(inst_t'length-1 downto inst_t'length-opcode_t'length) := opcode;
|
inst(inst_t'length-1 downto inst_t'length-opcode_t'length) := opcode;
|
||||||
inst(reg_ptr_t'length-1 downto 0) := reg_ptr_t(to_unsigned(reg_a, reg_ptr_t'length));
|
inst(reg_ptr_t'length-1 downto 0) := reg_ptr_t(to_unsigned(reg_ptr_a, reg_ptr_t'length));
|
||||||
|
|
||||||
return inst;
|
return inst;
|
||||||
|
|
||||||
end Instr;
|
end Instr;
|
||||||
|
|
||||||
function Instr(opcode : opcode_t; reg_a, reg_b : integer) return inst_t is
|
function Instr(opcode : opcode_t; reg_ptr_a, reg_ptr_b : integer) return inst_t is
|
||||||
variable inst : inst_t := (others => '0');
|
variable inst : inst_t := (others => '0');
|
||||||
begin
|
begin
|
||||||
inst(inst_t'length-1 downto inst_t'length-opcode_t'length) := opcode;
|
inst(inst_t'length-1 downto inst_t'length-opcode_t'length) := opcode;
|
||||||
inst(2*(reg_ptr_t'length)-1 downto reg_ptr_t'length) := reg_ptr_t(to_unsigned(reg_b, reg_ptr_t'length));
|
inst(2*(reg_ptr_t'length)-1 downto reg_ptr_t'length) := reg_ptr_t(to_unsigned(reg_ptr_b, reg_ptr_t'length));
|
||||||
inst(reg_ptr_t'length-1 downto 0) := reg_ptr_t(to_unsigned(reg_a, reg_ptr_t'length));
|
inst(reg_ptr_t'length-1 downto 0) := reg_ptr_t(to_unsigned(reg_ptr_a, reg_ptr_t'length));
|
||||||
|
|
||||||
return inst;
|
return inst;
|
||||||
|
|
||||||
end Instr;
|
end Instr;
|
||||||
|
|
||||||
function Instr(opcode : opcode_t; reg_a, reg_b, reg_c : integer) return inst_t is
|
function Instr(opcode : opcode_t; reg_ptr_a, reg_ptr_b, reg_ptr_c : integer) return inst_t is
|
||||||
variable inst : inst_t := (others => '0');
|
variable inst : inst_t := (others => '0');
|
||||||
begin
|
begin
|
||||||
inst(inst_t'length-1 downto inst_t'length-opcode_t'length) := opcode;
|
inst(inst_t'length-1 downto inst_t'length-opcode_t'length) := opcode;
|
||||||
inst(3*(reg_ptr_t'length)-1 downto 2*reg_ptr_t'length) := reg_ptr_t(to_unsigned(reg_c, reg_ptr_t'length));
|
inst(3*(reg_ptr_t'length)-1 downto 2*reg_ptr_t'length) := reg_ptr_t(to_unsigned(reg_ptr_c, reg_ptr_t'length));
|
||||||
inst(2*(reg_ptr_t'length)-1 downto reg_ptr_t'length) := reg_ptr_t(to_unsigned(reg_b, reg_ptr_t'length));
|
inst(2*(reg_ptr_t'length)-1 downto reg_ptr_t'length) := reg_ptr_t(to_unsigned(reg_ptr_b, reg_ptr_t'length));
|
||||||
inst(reg_ptr_t'length-1 downto 0) := reg_ptr_t(to_unsigned(reg_a, reg_ptr_t'length));
|
inst(reg_ptr_t'length-1 downto 0) := reg_ptr_t(to_unsigned(reg_ptr_a, reg_ptr_t'length));
|
||||||
|
|
||||||
return inst;
|
return inst;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user