- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
Anyone knows how to do Quad amplitude modulation QAM (16 or 64) doesnt matter.. using verilog? Please help me. Thanks.. -John- Kuala LumpurLink Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here are some practical principles:
1) get your input vector(bit stream or bytes) 2) convert to sets of 4 bits(16QAM) or 6 bits(64QAM). assume one set is I symbol, the other Q symbol 3) map your symbols to your chosen constellation e.g. if I = 0000 then assign +1023 to your symbol (for 11 bit DAC resolution) and so on. 4) then comes the hard bit: shaping/upsampling to DAC speed...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1) Do as kaz said
2) Do as kaz said 3) Do as kaz said, but as few bits as possible for your constellation, to save resources with the multiplications in point 4.2. For example, assign values of -2, -1, 1, 2. 4.1) Create a half-sine table (with DAC resolution) with nSamples and cycle through it at DAC speed to get a sine wave. Use two instances of this in parallel, to get the 0º and 90º sines, using a 0 and nSamples/2 offset respectively. You can adjust the cycle step to adjust the carrier frequency. 4.2) Re-syncrhonize the values I and Q values you got from point 3) to thte DAC clock and then multiply them by the 0º and 90º waves respectively. 4.3) Add the results of 4.2 and send them to the DAC. The multiplication is going to be your first performance bottleneck here. Have fun.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your comments, however:
With regard to -1, +1 you are possibly using a tool like DSP builder which eventually converts values. For final mapping you need to use full resolution for all levels of I/Q. quadrature modulation through upconversion(shift of baseband) to a carrier can be left to analogue people. shaping filter is most likely needed though some primitive comms can do without shaping. upsampling to DAC speed is important. If you decide for frequency shift then you need to multiply with full signal resolution otherwise your information will be lost in air or cables and will be just sending sine waves.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all Thanks for your feedback. i found some coding bout this. But seems like got error in certain line. Anyone expert to debug this?
module qam16(in,out); input [0:3] in; output out; voltage in,out; parameter real freq = 1.0 from (0:inf); parameter real ampl = 1.0, thresh = 2.5; parameter real tdelay = 0 from [0:inf), ttransit = 1/freq; real x,y,phi; integer row,col; analog begin row = 2*(V(in[3]) > thresh + V(in[2]) > thresh); col = 2*(V(in[1]) > thresh + V(in[0]) > thresh); x = transition(row-1.5,tdelay,ttransit); y = transition(col-1.5,tdelay,ttransit); phi = 2 * `M_PI * freq * $realtime(); V(out) <+ ampl * (x * cos(phi) + y * sin(phi)); end endmodule Thanks. -John-- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"got error in certain line" is a very vague description of your problem.
Aren't you supposed to write this yourself instead of copying/pasting pieces of code you find on the net?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi..actually im really2 new about this.. so i just try the available coding first..

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page