1
0
mirror of https://github.com/wfjm/w11.git synced 2026-04-30 21:49:43 +00:00
Files
wfjm.w11/rtl/vlib/rutil.vhd
wfjm 4aa1db49c7 Cleanups; 17bit support for tst_sram
- s3_sram_memctl: drop superfluous idata_cei=1 in s_write2
- arty_bram/tb/tbrun.yml: retire mem70 - now in tbcpu
- tst_sram.vhd: allow AWIDTH=17; sstat_rbf_awidth instead of _wide
- tcl/tst_sram/*.tcl: 17bit support; use sstat(awidth); add isnarrow
- rtl/vlib/rutil.vhd: added package, with imin helper function
2017-06-25 20:20:48 +02:00

42 lines
1.3 KiB
VHDL

-- $Id: rutil.vhd 917 2017-06-25 18:05:28Z mueller $
--
-- Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
-- This program is free software; you may redistribute and/or modify it under
-- the terms of the GNU General Public License as published by the Free
-- Software Foundation, either version 2, or at your option any later version.
--
-- This program is distributed in the hope that it will be useful, but
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-- for complete details.
--
------------------------------------------------------------------------------
-- Package Name: rutil
-- Description: Miscellaneous helper functions
--
-- Dependencies: -
-- Tool versions: ise 14.7; viv 2017.1; ghdl 0.34
-- Revision History:
-- Date Rev Version Comment
-- 2017-06-25 44 1.0 Initial version
------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
package rutil is
function imin (left, right: integer) return integer;
end package rutil;
package body rutil is
function imin (left, right: integer) return integer is
begin
if left < right then
return left;
else
return right;
end if;
end imin;
end package body rutil;