0
\$\begingroup\$

I have a led blinking code for MachXO2 breakout board written in VHDL. Actually I am new to VHDL.

I am not able to understand the meaning of these lines:

--internal oscillator
 COMPONENT OSCH
 GENERIC(
 NOM_FREQ: string := "53.20");
 PORT( 
 STDBY : IN STD_LOGIC;
 OSC : OUT STD_LOGIC;
 SEDSTDBY : OUT STD_LOGIC);
 END COMPONENT;
BEGIN
 --internal oscillator
 OSCInst0: OSCH
 GENERIC MAP (NOM_FREQ => "53.20")
 PORT MAP (STDBY => '0', OSC => clk, SEDSTDBY => OPEN);

Can you please tell me What these lines are doing?

JYelton
35.7k34 gold badges149 silver badges282 bronze badges
asked Aug 20, 2014 at 9:46
\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

These lines use an externally defined component, called OSCH, that magically provides a clock on the osc output as long as the stdby input is low.

The osc output is then connected to the clk signal and the stdby input connected to 0 (i.e. the switch-off function is not used.

answered Aug 20, 2014 at 11:02
\$\endgroup\$
1
  • \$\begingroup\$ you should find a package called OSCH which (if you are lucky its vhd) will show you the lower-level logic associated with that. I find it helps with VHDL to think of it like wiring chips up and a component is an IC and portmaping is wiring \$\endgroup\$ Commented Aug 20, 2014 at 11:17

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.