Hi all,
I have an issue..I am implementing dilation filter for my image processing project on an fpga..I have written the code and trying to simulate and check the performance.
2 days back my data was being written into the file but now my data file is empty.
Can you kindly tell me what do i need to do??
My partial code is---
library IEEE;library std;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_textio.all;
use STD.textio.all;
use std.env.all;
entity testbench is
end testbench;
architecture Behavioral of testbench is
file data:text open write_mode is "data.txt";
COMPONENT blk_mem2
PORT (
clka : IN STD_LOGIC;
wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
ena : IN STD_LOGIC;
addra : IN STD_LOGIC_VECTOR(11 DOWNTO 0);
dina : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
douta : OUT STD_LOGIC_VECTOR(7 DOWNTO 0)
);
END COMPONENT;
-- signal declarations for bram_test.
signal ena : std_logic := '1';
signal wea : std_logic_vector(0 downto 0) := "0";
signal dina : std_logic_VECTOR(7 downto 0) := "UUUUUUUU";
signal douta : std_logic_VECTOR(7 downto 0) := "UUUUUUUU";
signal addra : std_logic_VECTOR(11 downto 0):= "000000000000";
signal clk : std_logic;
begin
--Instantiating BRAM.
bram : blk_mem2
port map(
clka => clk,
ena => ena,
wea => wea,
addra => addra,
dina => dina,
douta => douta);
--Simulation process.
bram1 : process(clk)
-------------
-------------
.
.
.
.
.
-------------
variable txt:line;
begin
if (rising_edge(clk))
-------------
-------------
.
.
.
.
.
-------------
wea <= "1";
dina<=temp1;
if(falling_edge(clk)) then
write (txt,temp1);
writeline(data,txt);
end if;
end process bram1;
--Clock generation
process
begin
clk <= '1';
wait for 1ns; --"ON" time.
clk <= '0';
wait for 1ns; --"OFF" time.
end process;
end Behavioral;
I also started a new project in xilinx ise and tried the simulation but my data file was still empty.Can you guys tell me what the resaon is?
Thanks,
Sreeni