OpenCores
URL https://opencores.org/ocsvn/z80soc/z80soc/trunk

Subversion Repositories z80soc

[/] [z80soc/] [branches/] [RonivonCosta/] [DE1/] [ROM/] [z802rom.sh] - Diff between revs 11 and 31

Only display areas with differences | Details | Blame | View Log

Rev 11 Rev 31
#!/bin/sh
#!/bin/sh
file=rom.hex
file=rom.hex
echo "library IEEE;
echo "library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_1164.all;
use ieee.numeric_std.all;
use ieee.numeric_std.all;
 
 
entity rom is
entity rom is
        port(
        port(
                Clk             : in std_logic;
                Clk             : in std_logic;
                A               : in std_logic_vector(15 downto 0);
                A               : in std_logic_vector(15 downto 0);
                D               : out std_logic_vector(7 downto 0)
                D               : out std_logic_vector(7 downto 0)
        );
        );
end rom;
end rom;
 
 
architecture rtl of rom is
architecture rtl of rom is
begin
begin
 
 
process (Clk)
process (Clk)
begin
begin
 if Clk'event and Clk = '1' then
 if Clk'event and Clk = '1' then
        case A is"
        case A is"
 
 
 
 
ADDR=0
ADDR=0
for i in `cat $file | tr ',' ' '`
for i in `cat $file | tr ',' ' '`
do
do
  BL1="when x\""
  BL1="when x\""
  BL3="\" => D <= x\"$i\";"
  BL3="\" => D <= x\"$i\";"
  hexaddr="000"`echo "obase=16;ibase=10;$ADDR" | bc`
  hexaddr="000"`echo "obase=16;ibase=10;$ADDR" | bc`
  fixhexaddr=${hexaddr:(-4)}
  fixhexaddr=${hexaddr:(-4)}
  echo "             "$BL1$fixhexaddr$BL3
  echo "             "$BL1$fixhexaddr$BL3
  let ADDR=ADDR+1
  let ADDR=ADDR+1
done
done
echo "             when others => D <= x\"00\";
echo "             when others => D <= x\"00\";
        end case;
        end case;
 end if;
 end if;
end process;
end process;
end;"
end;"
 
 
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.