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

Code Generation And Reuse

A C++ compiler generates assembly code to be loaded into memory for execution. The psC compiler generates a binary programming file to configure the FPGA. Once configured, the FPGA is a digital circuit, and as it is intrinsically parallel, it is often required to repeat circuits, registers, functions and components. The features described here allow the programmer to generate code and reuse functions and components.

"temp" variables

The psC language includes "temp" variable declaration. A “temp” variable is a name given to an expression. The name can then be used whenever the expression is required. This improves readability, but also save resources on the FPGA. "temp" variables may have parameters, acting like C++ macros. The following example illustrates the use of temp variables. But have a look at the other examples to see how useful they are.

The "for ... end" instruction

The for…end instruction is the most important code generation feature. It uses constants and the paste operator. The ## operator is used to join two separate tokens into a single token. The for…end instruction allows you to repeat a block of text where the iterator is replaced in each repetition with a value from the constants list.  Here is a simple example:

Templates

Templates are the second most important feature, and certainly the most powerful, for code generation. There is a fundamental difference between C++ and psC templates. In C++, template parameters are, for example, constants, type names, classes... In psC, template parameters are not related to psC language items. The psC compiler instantiates the templates at pre-processing time. Therefore, template parameters are more basic elements:

  • Constants of any type
  • Identifiers for any item
  • Lexemes  like +, *, =

As shown in this example, templates have the required flexibility for code generation. Templates are available for components, sequential functions and temp variables.

Libraries

Like in all high-level languages, libraries are required to facilitate reuse by placing together declarations to support certain functionalities. For example, a floating-point library contains all that is required to support floating-point operations in a psC program. The example shows how libraries are used with the main component.

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

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

Powered by GoDaddy Website Builder