Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

BPSK mapper for OFDM modulation

Status
Not open for further replies.

Kosyas41

Member level 3
Joined
Apr 12, 2016
Messages
62
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
502
Hello,
Im trying to write mapper for BPSK modulation and I write next code.Could you pls check this code.is it works correctly or not
Code:
--mapper
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_signed.all;
entity bpsk is
			port(
					clk : in std_logic;
					d :in std_logic;
					q :out std_logic_vector(1 downto 0)
					);
end bpsk;
architecture bpsk_arch of bpsk is
begin
process(clk)
begin
		if (clk'event and clk='1') then
					if d ='0' then	
									q<="01";
					else
									q<="11";
					end if;

		end if;
end process;
end bpsk_arch;
 

Write testbench and check it.

But:
1) Better use numeric_std library that std_logic_arith;
2) Usually when d = 0 q <= "11" and when d = 1 q <= "01", but it is not matter.
 

ok.thanks for reply.I explained my code little bit wrong,because Im using it like a mapper.THe main ideal like.get some serial data on input after mapping it and put it on the output.
 

This code is simply a registered multiplexer of two constants, why is this so hard to figure out or determine if it works (by inspection alone)?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top