UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor mo7amed98
Visitor
458 Views
Registered: ‎05-10-2019

Voltage Controlled Oscillator (VCO)

Hello my friends .. i'm new to vhdl programming language and I need a help with this code ..
suppose frequency values chosen are 100,200,300,400,500,600,700,800 then what will be the code??
Thanks in advance :)
nn.jpg

0 Kudos
6 Replies
Scholar u4223374
Scholar
451 Views
Registered: ‎04-26-2015

Re: Voltage Controlled Oscillator (VCO)

So basically your question is "I've been given this project to do, I want someone else to do it". Correct? Would I also be correct in saying that you (or your parents, or the local government) have paid a substantial a substantial amount of money to learn this stuff, which you are trying to avoid learning?

 

Try to design it yourself. Simulate it. Test it. If you have problems, then show us the code you've written, explain what your problem is (not "I don't know how to do it" or "it doesn't work") and you might get some helpful advice.

 

 

 

Visitor mo7amed98
Visitor
433 Views
Registered: ‎05-10-2019

Re: Voltage Controlled Oscillator (VCO)

If we(I and my colleagues) had a good professor to teach us vhdl , I wouldn't have asked but we couldn't really understand what he explain and now we've got a task and we've a deadline which is after tomorrow and we're supposed to fail just because he couln't explain or teach us well!!! we're missing a lot of concepts we're just in a level of beginners and in a bad need to get a good grade :(

0 Kudos
Scholar u4223374
Scholar
415 Views
Registered: ‎04-26-2015

Re: Voltage Controlled Oscillator (VCO)

The point still applies - if you're doing this course to learn something, having someone else do your assignment is not going to help. A good grade in the course tells employers that you know VHDL, which will clearly not be the case here.

 

There are plenty of VHDL tutorials on the internet (just search "VHDL tutorial"), and the course probably has a relevant textbook too.

0 Kudos
Visitor mo7amed98
Visitor
393 Views
Registered: ‎05-10-2019

Re: Voltage Controlled Oscillator (VCO)

here's our try sir 
library ieee;
use ieee.std_logic_1164.all;
entity VCO is
port( r : in std_logic;
control_freq : in std_logic_vector(2 downto 0);
clkout : buffer std_logic );
end VCO;
architecture struct of VCO is
signal clk : std_logic;
begin
clk <= not clk after 0.5 us;
process(clk)
begin
if(r='1') then
case control_freq is
when "000" => clkout <= not clkout after 40 ms;
when "001" => clkout <= not clkout after 20 ms;
when "010" => clkout <= not clkout after 10 ms;
when "011" => clkout <= not clkout after 5 ms;
when "100" => clkout <= not clkout after 4 ms;
when "101" => clkout <= not clkout after 2.5 ms;
when "110" => clkout <= not clkout after 2 ms;
when "111" => clkout <= not clkout after 1.25 ms;
when others => null;
end case;
elsif(r='0') then
case control_freq is
when "000" => clkout <= not clkout after 40 us;
when "001" => clkout <= not clkout after 20 us;
when "010" => clkout <= not clkout after 10 us;
when "011" => clkout <= not clkout after 5 us;
when "100" => clkout <= not clkout after 4 us;
when "101" => clkout <= not clkout after 2.5 us;
when "110" => clkout <= not clkout after 2 us;
when "111" => clkout <= not clkout after 1.25 us;
when others => null;
end case;
end if;
end process;
end struct;

0 Kudos
346 Views
Registered: ‎06-21-2017

Re: Voltage Controlled Oscillator (VCO)

Are you trying to design something that can be synthesized or only simulated?  The AFTER keyword is ignored in synthesis.  Your code may simulate, but when you build the device, clkout will toggle at the same rate, regardless of your control inputs.  Here's a hint.  Use a counter to divide the clock.  You could load the counter with different values based on your inputs or you could count up and compare the counter to some value that is based on yur inputs.

0 Kudos
Newbie nathan-31
Newbie
163 Views
Registered: ‎05-21-2019

Re: Voltage Controlled Oscillator (VCO)

Voltage controlled oscillator is an oscillator with an output signal whose output can be varied over a range, which is controlled by the input DC voltage. It is anoscillator whose output frequency is directly related to the voltage at its input.

0 Kudos