Instant SoC Class Library  3.1
FC_IO_Clk Class Reference

System clock input. More...

Inheritance diagram for FC_IO_Clk:
FC_Base

Public Member Functions

 FC_IO_Clk (int Clk_MHz)
 

Static Public Attributes

static U32 g_clk
 

Detailed Description

System clock input.

Adds to interface:
<name> : in std_logic
where <name> is c++ object name.
Only one instance of this class is allowed and it must be declared as the first object in the hardware def section.See the following example:

#include "fc_io.h"
#include "fc_system.h"
int main()
{
//% hw_begin
FC_IO_Clk clk(100);
FC_IO_Out counter(8);
//% hw_end
int counter_value = 0;
timer.Start(1, TU_us);
for (;;)
{
timer.WaitTimer();
counter = counter_value++;
}
}

Constructor & Destructor Documentation

◆ FC_IO_Clk()

FC_IO_Clk::FC_IO_Clk ( int  Clk_MHz)

Constructor

Parameters
Clk_MHzthe frequency of the clock in MHz.
FC_IO_Clk
System clock input.
Definition: fc_io.h:55
FC_IO_Out
Logic output.
Definition: fc_io.h:126
FC_System_Timer
Timer.
Definition: fc_system.h:78