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

Subversion Repositories plasma

[/] [plasma/] [trunk/] [vhdl/] [ram.vhd] - Diff between revs 2 and 7

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 7
Line 56... Line 56...
      readline(load_file, hex_file_line);
      readline(load_file, hex_file_line);
      hread(hex_file_line, data);
      hread(hex_file_line, data);
      storage(index) := data;
      storage(index) := data;
      index := index + 1;
      index := index + 1;
   end loop;
   end loop;
   assert false report "done reading code" severity note;
   --assert false report "done reading code" severity note;
 
 
   wait on clk;  --wait for line noise to go away
   wait on clk;  --wait for line noise to go away
 
   wait on mem_address;
 
 
   loop
   loop
      wait on clk, mem_address, mem_write;
      wait on clk, mem_address, mem_write;
 
 
      --support putchar() when writing to address 0xffff
      --support putchar() when writing to address 0xffff
      if rising_edge(clk) then
      if rising_edge(clk) then
         if mem_write = '1' and mem_address = ONES(15 downto 0) then
         if mem_byte_sel(0) = '1' and mem_address = ONES(15 downto 0) then
            index := conv_integer(mem_data_w(6 downto 0));
            index := conv_integer(mem_data_w(6 downto 0));
            if index /= 10 then
            if index /= 10 then
               c := character'val(index);
               c := character'val(index);
               write(hex_file_line, c);
               write(hex_file_line, c);
               line_length := line_length + 1;
               line_length := line_length + 1;
Line 84... Line 85...
      index := conv_integer(mem_address(mem_address'length-1 downto 2));
      index := conv_integer(mem_address(mem_address'length-1 downto 2));
      data := storage(index);
      data := storage(index);
 
 
      if mem_write = '0' then
      if mem_write = '0' then
         mem_data_r <= data;
         mem_data_r <= data;
 
      else
 
         mem_data_r <= HIGH_Z; --ZERO;
      end if;
      end if;
      if mem_byte_sel(0) = '1' then
      if mem_byte_sel(0) = '1' then
         data(7 downto 0) := mem_data_w(7 downto 0);
         data(7 downto 0) := mem_data_w(7 downto 0);
      end if;
      end if;
      if mem_byte_sel(1) = '1' then
      if mem_byte_sel(1) = '1' then

powered by: WebSVN 2.1.0

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