add effect mixer module and posibility to switch effects
This commit is contained in:
+37
-4
@@ -12,10 +12,18 @@ module effect_controler #( parameter
|
||||
output signed [d_width-1: 0] o_l_data,
|
||||
output signed [d_width-1: 0] o_r_data,
|
||||
|
||||
output o_read_done, // read done from effects module
|
||||
output o_read_ready, // ready read from reefects module
|
||||
|
||||
|
||||
input [1:0] sw, // effect control swiches
|
||||
|
||||
output signed [memory_d_width-1: 0] o_data_to_eff, // Data output to effects module
|
||||
output o_data_valid, // data valid to read (FIFO not empty). data valid signal to effect module
|
||||
input i_read_enable,
|
||||
input signed [memory_d_width-1: 0] i_data_from_eff, // Data output to effects module
|
||||
input i_read_enable, // enable read from input fifo
|
||||
input signed [memory_d_width-1: 0] i_data_from_eff_sw0, // Data output to effects module
|
||||
input signed [memory_d_width-1: 0] i_data_from_eff_sw1, // Data output to effects module
|
||||
|
||||
input i_dv_from_eff // data valid to read (FIFO not empty). data valid signal to effect module
|
||||
|
||||
);
|
||||
@@ -26,9 +34,14 @@ wire signed [memory_d_width-1: 0] w_o_data; //output data to io_module
|
||||
|
||||
wire w_empty_in, w_full_in;
|
||||
wire w_empty_out, w_full_out;
|
||||
|
||||
wire [memory_d_width-1:0] w_data_to_fifo; // wire connets mixer to output fifo
|
||||
|
||||
wire [address_width-1:0] w_data_fill_input; // shows how full are in FIFO memmory for intput
|
||||
wire [address_width-1:0] w_data_fill_output; // shows how full are in FIFO memmory for output
|
||||
|
||||
wire w_data_valid_to_fifo; // data valid to write output FIFO from mixer
|
||||
|
||||
assign o_l_data [ d_width-1 : d_width - memory_d_width ] = w_o_data; // only left chanal are used in controler
|
||||
assign o_r_data [ d_width-1 : d_width - memory_d_width ] = w_o_data; // same as left
|
||||
|
||||
@@ -62,14 +75,34 @@ sync_fifo #(
|
||||
.full(w_full_out),
|
||||
.empty(w_empty_out),
|
||||
.data_fill(w_data_fill),
|
||||
.data_in(i_data_from_eff),
|
||||
.data_in(w_data_to_fifo),
|
||||
.w_clk(clk),
|
||||
.r_clk(mclk),
|
||||
.reset(reset),
|
||||
.wr_en( w_full_out ? 1'b0 : i_dv_from_eff ), // checking is FIFO full
|
||||
.wr_en( w_data_valid_to_fifo ), // checking of FIFO full are performing mixer module
|
||||
.rd_en( w_empty_out ? 1'b0 : 1'b1 ) // checking is FIFO empty
|
||||
);
|
||||
|
||||
|
||||
|
||||
// Effect mixer, performs audio data merging
|
||||
effect_mixer #(
|
||||
.data_width(memory_d_width) // memory data width
|
||||
) effect_mixer (
|
||||
.sw(sw),
|
||||
.clk(clk),
|
||||
.reset(reset),
|
||||
.i_fifo_full(w_full_out),
|
||||
.o_read_done(o_read_done), // read from effect module done
|
||||
.o_read_ready(o_read_ready), // ready to read from effect module
|
||||
.o_data(w_data_to_fifo), // data to output FIFO memory
|
||||
.o_data_valid(w_data_valid_to_fifo),
|
||||
.i_dv_from_eff(i_dv_from_eff),
|
||||
.i_data_from_eff_sw0(i_data_from_eff_sw0), // Data output to effects module
|
||||
.i_data_from_eff_sw1(i_data_from_eff_sw1)
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
endmodule
|
||||
Reference in New Issue
Block a user