Move the VHDL support package
This commit is contained in:
parent
4db5b9d7ed
commit
7f955cc070
|
|
@ -0,0 +1,41 @@
|
|||
--
|
||||
-- Support routines for Icarus Verilog VHDL output
|
||||
--
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
|
||||
package Verilog_Support is
|
||||
|
||||
-- This routine implements $finish by terminating the simulation
|
||||
-- It is implemented via the VHPI interface
|
||||
procedure finish;
|
||||
attribute foreign of finish : procedure is "VHPIDIRECT finish";
|
||||
|
||||
-- Routines to implement Verilog reduction operators
|
||||
function Reduce_OR(X : unsigned) return std_logic;
|
||||
|
||||
|
||||
end Verilog_Support;
|
||||
|
||||
package body Verilog_Support is
|
||||
|
||||
-- This is a dummy body to provide a default implementation
|
||||
-- if VHPI is not supported
|
||||
procedure finish is
|
||||
begin
|
||||
assert false severity failure;
|
||||
end finish;
|
||||
|
||||
function Reduce_OR(X : unsigned) return std_logic is
|
||||
begin
|
||||
for I in X'range loop
|
||||
if X(I) /= '1' then
|
||||
return '0';
|
||||
end if;
|
||||
end loop;
|
||||
return '1';
|
||||
end function;
|
||||
|
||||
end Verilog_Support;
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
--
|
||||
-- VHPI support routines for VHDL output.
|
||||
--
|
||||
|
||||
package Verilog_Support is
|
||||
procedure finish;
|
||||
attribute foreign of finish : procedure is "VHPIDIRECT finish";
|
||||
end Verilog_Support;
|
||||
|
||||
package body Verilog_Support is
|
||||
procedure finish is
|
||||
begin
|
||||
assert false severity failure;
|
||||
end finish;
|
||||
end Verilog_Support;
|
||||
Loading…
Reference in New Issue