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?
1 Answer 1
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.
-
\$\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\$user16222– user162222014年08月20日 11:17:53 +00:00Commented Aug 20, 2014 at 11:17