manubangalore88@gmail.com
Newbie level 1
The output of NRZ encoder is 1 bit signal. The sine wave generated using the program below is 8 bits.
My question is how to multiply a 1 bit signal with an 8 bit one and generate a QPSK modulated wave??
module Sine_Cos_Waves( clk, reset, sine, cos);
input clk, reset;
output [7:0] sine,cos;
reg [7:0] sine_r, cos_r;
assign sine = sine_r + {cos_r[7], cos_r[7], cos_r[7], cos_r[7:3]};
assign cos = cos_r - {sine[7], sine[7], sine[7], sine[7:3]};
always@(posedge clk or negedge reset)
begin
if (!reset)
begin
sine_r <= 0;
cos_r <= 120;
end
else
begin
sine_r <= sine;
cos_r <= cos;
end
end