- Minor changes

git-svn-id: http://moon:8086/svn/vhdl/trunk@220 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
2009-01-10 19:22:25 +00:00
parent 170a65237b
commit 9c45912627
2 changed files with 52 additions and 25 deletions
+29 -17
View File
@@ -306,8 +306,6 @@ BEGIN
rfgen_q_out_f <= to_real(rfgen_dout_q);
tb : PROCESS
file RESULT_FREQ: text open write_mode is "ratio.txt";
variable L: line;
BEGIN
@@ -315,8 +313,6 @@ BEGIN
wait for 4*PERIOD;
rst <= '0';
fprint(RESULT_FREQ, L,"%s\n", natural'image(cic_ratio));
wait for 2*PERIOD;
-------------------------------------------
-- Program gains
@@ -353,6 +349,21 @@ BEGIN
wait;
END PROCESS;
tb_param : PROCESS
file RESULT_R: text open write_mode is "ratio.txt";
file RESULT_N: text open write_mode is "nstages.txt";
variable L: line;
BEGIN
-- Wait 100 ns for global reset to finish
wait until rising_edge(clk) and rst = '0';
fprint(RESULT_R, L,"%s\n", natural'image(cic_ratio));
fprint(RESULT_N, L,"%s\n", natural'image(cic_nstages));
wait;
END PROCESS;
tb_fo : PROCESS(clk)
file RESULT_Ii: text open write_mode is "i_in.txt";
file RESULT_Qi: text open write_mode is "q_in.txt";
@@ -363,21 +374,22 @@ BEGIN
variable L: line;
BEGIN
if rising_edge(clk) and fileout_enable = '1' then
if ddc_din_vld = '1' then
fprint(RESULT_Ii, L,"%s\n", REAL'image(to_real(rfgen_dout_i)));
fprint(RESULT_Qi, L,"%s\n", REAL'image(to_real(rfgen_dout_q)));
end if;
if ddc_dout_vld = '1' then
fprint(RESULT_Ifir, L,"%s\n", REAL'image(to_real(ddc_dout_i)));
fprint(RESULT_Qfir, L,"%s\n", REAL'image(to_real(ddc_dout_q)));
end if;
if ddc_dec_vld = '1' then
fprint(RESULT_Idec, L,"%s\n", REAL'image(to_real(ddc_dec_i)));
fprint(RESULT_Qdec, L,"%s\n", REAL'image(to_real(ddc_dec_q)));
if rising_edge(clk) then
if fileout_enable = '1' then
if ddc_din_vld = '1' then
fprint(RESULT_Ii, L,"%s\n", REAL'image(to_real(rfgen_dout_i)));
fprint(RESULT_Qi, L,"%s\n", REAL'image(to_real(rfgen_dout_q)));
end if;
if ddc_dout_vld = '1' then
fprint(RESULT_Ifir, L,"%s\n", REAL'image(to_real(ddc_dout_i)));
fprint(RESULT_Qfir, L,"%s\n", REAL'image(to_real(ddc_dout_q)));
end if;
if ddc_dec_vld = '1' then
fprint(RESULT_Idec, L,"%s\n", REAL'image(to_real(ddc_dec_i)));
fprint(RESULT_Qdec, L,"%s\n", REAL'image(to_real(ddc_dec_q)));
end if;
end if;
end if;
END PROCESS;
END;