Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

this is my code for fir filter.i want write the output in "to_file" text file.

Status
Not open for further replies.

ketanlad_18

Newbie level 4
Joined
Nov 9, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,363
this is my code for fir filter.i want write the output in "to_file" text file.

library IEEE;
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 work.utils_pkg.all;
library work;
use work.write_fp.all;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity output is

end output;

architecture Behavioral of output is

COMPONENT fir
PORT(
x : In Std_logic_vector (3 DownTo 0);
clk : In std_logic;
rst : In std_logic;
y : Out Std_logic_vector (3 DownTo 0)
);
END COMPONENT;

SIGNAL x : Std_logic_vector (3 DownTo 0) := "0000";
SIGNAL clk : std_logic := '0';
SIGNAL rst : std_logic := '0';
SIGNAL y : Std_logic_vector (3 DownTo 0) := "0000";

begin

Inst_fir: fir PORT MAP(
x => x,
clk => clk,
rst => rst,
y => y );

clk <= NOT(clk) AFTER 5 ns;

p1:process
file to_file:text open write_mode is "C:\Xilinx92i\fir\to_file.txt";

variable comp_line:line;

begin

write (comp_line,string'("output for fir"));
writefp(comp_line,y);
writeline(to_file,comp_line);
end process p1;

end Behavioral;

this is my code for fir filter.i want write the output in "to_file" text file.but following error is occured.
ERROR:Xst:1914 - "C:/Xilinx92i/fir/output.vhd" line 80: File <to_file> does not exist.

pls help me to solve this error.
 

Re: this is my code for fir filter.i want write the output in "to_file" text file.

ERROR:Xst:1914 - "C:/Xilinx92i/fir/output.vhd" line 80: File <to_file> does not exist.

Hi ketanlad_18,

One thing i noted is that here the error occurred is at line number 80 which is not there in the above code.... (from beginning to the end Behavioral the lines may be less are less than 80)
 

Re: this is my code for fir filter.i want write the output in "to_file" text file.

You cannot run this code through XST because it is a testbench. You need to run it with the ISE simulator. XST is a synthesisor and this code is not suitable for synthesis (so you cannot run it on a chip)

On your code:
1. Your process will loop forever at 0 time. You either need a sensitivity list or some wait statements in there.
2. what is the writefp() procedure? it is not a standard one.
 

Re: this is my code for fir filter.i want write the output in "to_file" text file.

can you please give me the vhdl code for FIR filters.
 

Re: this is my code for fir filter.i want write the output in "to_file" text file.

How much are you willing to pay?
 

Re: this is my code for fir filter.i want write the output in "to_file" text file.

can you please give me the vhdl code for FIR filters.

Your contextless thread hijack calls for random google hit #2.

There you go:

It's FIR, it's VHDL code, all per your detailed requirements. Problem solved, right? What's that you say, you cannot use this code? Oh however can this be, since it totally conforms to your detailed specs?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top