The project is up on Github: https://github.com/gtaylormb/opl3_fpga
I'm new to Github so I'm still figuring things out--let me know if I should change anything.
always_ff @(posedge clk)
if (sample_clk_en) begin
feedback[bank_num][op_num][0] <= out;
feedback[bank_num][op_num][1] <= feedback[bank_num][op_num][0];
end
always_comb
feedback_result = ((feedback[bank_num][op_num][0] + feedback[bank_num][op_num][1]) << fb) >> 9;
int16_t feedback() const {
if( m_fb == 0 ) {
return 0;
}
return ( ( m_feedback[0] + m_feedback[1] ) << m_fb ) >> 9;
}
/**
* @brief Push feedback into the queue
* @param[in] fb 13 bit feedback from channel output
*/
void pushFeedback( int16_t fb ) {
m_feedback[0] = m_feedback[1];
m_feedback[1] = fb;
}
x0=out; x1=x0;
x1=x0; x0=out;
always_ff @(posedge clk)
if (sample_clk_en) begin
feedback[bank_num][op_num][0] <= out;
feedback[bank_num][op_num][1] <= feedback[bank_num][op_num][0];
end
always_ff @(posedge clk)
if (sample_clk_en) begin
feedback[bank_num][op_num][1] <= feedback[bank_num][op_num][0];
feedback[bank_num][op_num][0] <= out;
end
Return to Yamaha OPL-3 research
Users browsing this forum: No registered users and 1 guest