- fixed valid signal
- fixed wav write git-svn-id: http://moon:8086/svn/vhdl/trunk@1321 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -109,6 +109,7 @@ architecture Behavioral of fir_parallel is
|
||||
SIGNAL x : stages_array_t(0 to ntaps-2);
|
||||
SIGNAL y : stages_array_t(0 to ntaps-2);
|
||||
SIGNAL h : coeff_array_t(0 to ntaps-1);
|
||||
SIGNAL vld : unsigned(0 to ntaps-2);
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
begin
|
||||
@@ -144,7 +145,7 @@ begin
|
||||
x_in => d_in,
|
||||
y_in => zero_in,
|
||||
h_in => h(ntaps-1),
|
||||
out_valid => out_valid,
|
||||
out_valid => vld(0),
|
||||
x_out => x(0),
|
||||
y_out => y(0),
|
||||
y_out_clr => '0'
|
||||
@@ -171,11 +172,11 @@ begin
|
||||
(
|
||||
srst => srst,
|
||||
clk => clk,
|
||||
in_valid => in_valid,
|
||||
in_valid => vld(i-1),
|
||||
x_in => x(i-1),
|
||||
y_in => y(i-1),
|
||||
h_in => h(ntaps-i-1),
|
||||
out_valid => open,
|
||||
out_valid => vld(i),
|
||||
x_out => x(i),
|
||||
y_out => y(i),
|
||||
y_out_clr => '0'
|
||||
@@ -201,11 +202,11 @@ begin
|
||||
(
|
||||
srst => srst,
|
||||
clk => clk,
|
||||
in_valid => in_valid,
|
||||
in_valid => vld(ntaps-2),
|
||||
x_in => x(ntaps-2),
|
||||
y_in => y(ntaps-2),
|
||||
h_in => h(0),
|
||||
out_valid => open,
|
||||
out_valid => out_valid,
|
||||
x_out => x_out,
|
||||
y_out => d_out,
|
||||
y_out_clr => '0'
|
||||
|
||||
@@ -184,7 +184,7 @@ BEGIN
|
||||
|
||||
BEGIN
|
||||
if rising_edge(clk) and fileout_enable = '1' and out_valid = '1' then
|
||||
so := to_integer(y_out);
|
||||
so := to_integer(to_signed(y_out));
|
||||
write(fo, so);
|
||||
end if;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user