ICI Techno

ICI TechnoICI TechnoICI Techno

ICI Techno

ICI TechnoICI TechnoICI Techno
  • Home
  • Why Novakod
  • Products
    • Download
    • Licenses
    • License Self-Help
  • Support
    • Documentation
    • Examples and LIbraries
  • More
    • Home
    • Why Novakod
    • Products
      • Download
      • Licenses
      • License Self-Help
    • Support
      • Documentation
      • Examples and LIbraries
  • Sign In

  • My Account
  • Signed in as:

  • filler@godaddy.com


  • My Account
  • Sign out


Signed in as:

filler@godaddy.com

  • Home
  • Why Novakod
  • Products
    • Download
    • Licenses
    • License Self-Help
  • Support
    • Documentation
    • Examples and LIbraries

Account


  • My Account
  • Sign out


  • Sign In
  • My Account

psC Compiler

Compiled high-level language

We created a compiled high level-language called psC, generating

Hand-Coded Quality VHDL

for parallel and sequential algorithms.

The foundation of the psC language is discussed below.

The Parallel and Synchronous Paradigm

As emphasized by Bjarne Stroustrup, the most important objective when designing a language for compilation is to:

Map the language features efficiently onto the machine

Therefore, in order to create a true high-level language for efficient compilation, not for synthesis, we need to ensure that all psC language features map easily onto the FPGA machine. The psC language was designed from the ground up for a "parallel and synchronous machine" like the FPGA.

Hierarchical components with IO ports

Let's not forget the machine is a logic circuit. As with all other HDLs (hardware description languages) the main abstraction mechanism is the component. The psC language supports components with IO ports, including hierarchical components. The Novakod Studio environment enables both schematic and textual entry for hierarchical components. Here is an example of a simple counter component:

psC schematic

psC schematic

psC schematic

psC code

psC schematic

psC schematic

The essence of the psC language

Hierarchical components are essential, but simple components are the heart of the psC language. Again, for efficient compilation, the language component features must map directly onto the FPGA machine. Let's compare the psC component model with an FPGA circuit to better understand how the psC language easily maps onto the FPGA. Here is the model of a psC component and the code for a simple counter component. The psC maps directly onto a logic circuit:

  • Ports and variables are registers 
  • psC functions are combinatorial circuits
  • The behavior is a simple synchronous sequential circuit

psC Component Model

Typical psC Component

Typical psC Component

Typical psC Component

Typical psC Component

Typical psC Component

In the above counter component, there are three input ports, one output port and no variables.  The CCounter component has three functions: 

  • DoReset()
  • CountUp()
  • CountDown()

In this example, each function has a single assignment and is executed when triggered by an event on the input ports. So, for this example, if there is an event on iUp, the function CountUp() is executed and oValue is increased. It’s that simple! We will explain how events are used in the next section. For those who know about digital systems, you can see that the psC component model is a synchronous sequential circuit. Therefore, you understand how easily and efficiently the compiler can map psC code to an FPGA machine. 

Abstraction of circuit details

 It is important to notice how the circuit details are hidden. There is no clock to manage, no combinatorial circuit to define, no flip-flop to control, no state machine to control execution ... 

You only use abstract high-level concepts like events, functions and assignments.

Signals, Events and communication

How do components communicate?

As with most HDLs, a psC program consists of interconnected components. In a psC program, one output port connects to one or more input ports using a signal, but a signal is more than a logic value; it contains two pieces of information:

  • A value: The value corresponds to the usual logic value in digital systems, but many types are supported, like int, enum, fix, float...
  • An event: The event is the execution control mechanism in psC; a component sends an event to trigger the execution of a function in another component.

Both the event and the value can be assigned independently using our special assignment operator:

  • oP = 3     assigns 3 to the port oP,
  • oP :          sends an event without changing the value and
  • oP := 3    assigns the value and sends an event.

In the example below, the process PSource sets a value and sends an event on the output oP for every event received on the input iP. On the next step, the value and the event are received by the PTarget process. The received event triggers the execution of the function TrgtFct(), which, in turn, executes an assignment and sends an event. Discussion of signal mapping on the FPGA will follow.

Multiprocessing and multithread

In a psC program, processes are instances of components and signals perform inter-process communication.

Each process can receive multiple events simultaneously, and therefore may execute multiple threads of instructions.

Free communication

Free communication

Free communication

Free communication

Free communication

 

In C++, inter-process communication requires programmed synchronization mechanisms.  Since execution of psC is parallel and synchronous, there is no overhead for communication. Effectively, each output port is a shared variable.


Inter-process communications are free.

Global program execution

The execution paradigm

For large FPGAs, a psC program will have thousands of components and signals, maybe even more. How does this maze of events and functions results in something useful and easy to program? Let's first mention that more than 100 000 lines of psC code have been written for all kinds of applications including signal processing, video drivers, floating point operations... all with hand-coded quality of results. The psC language has been used in teaching digital systems design with only one prerequisite: basic C++ knowledge. Because of its execution model—a psC program only uses events, functions and assignments—it is quite simple to use. Students without prior knowledge of digital systems were able to design a processor.

For now, let's discuss how a psC program executes. Assuming you have a basic understanding of components and signals, here are the execution rules for a complex program that define the parallel and synchronous paradigm.  

At each step (clock cycle):

  1. In any component, a function executes if it is triggered by an event.
  2. All assignments in a function are executed simultaneously, not sequentially.
  3. Multiple assignments are managed with control statements (if, switch).
  4. Assignments to the same variable or port from multiple functions are based on the function priority.
  5. Assignments work as in C++, if not assigned, the value does not change.
  6. All assignments and all generated events are effective at the next step.

Mapping onto the FPGA

Read only if you are interested in understanding the mapping details

As we now understand, a psC program consists of interconnected components and execution is controlled by events. The last question is: 

How does the compiler efficiently manage the events?

As shown below, since a signal contains two pieces of information, additional memory is required for the event. For example, implementation of an integer output port will require 33 bits. When executed, a function might perform a change of value or send events. The compiler will insert two control blocks, one for the assignment and one for the next event. If the assignment symbol contains "=" the assignment control block will send an enable signal to the port or variable being assigned. If the assignment symbol contains ":" the next event control block will set the event latch for one clock cycle.

This overhead is small compared to user-defined execution control based on the clock.

Compilation = mapping = efficiency

Because of the compiler mapping efficiency, you get Hand-coded quality generated VHDL from high-level psC.

Copyright © 2019-23 ICI Techno - All right reserved.

  • Home
  • Why Novakod
  • Download
  • Licenses
  • Privacy polilcy
  • Documentation

Powered by GoDaddy Website Builder