EnglishFrenchSpanish

OnWorks favicon

alliance-genpat - Online in the Cloud

Run alliance-genpat in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command alliance-genpat that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


genpat, A procedural pattern file generator

SYNOPSIS


genpat [-v] [-k] [file]

DESCRIPTION


Genpat is a set of C fonctions that allows a procedural description of input pattern file
for the logic simulator ASIMUT. The Unix genpat command accepts a C file as input and
produces a pattern description file as output. The extension ".c" is not to be given. The
file generated by genpat is in pat format, so IT IS STRONGLY RECOMMENDED TO SEE pat(5)
BEFORE THIS MANUAL.

OPTIONS


-v verbose mode

-k keeps the executable along with the compilation Makefile after completion

GENPAT FILE FORMAT


From a user point of view, genpat is a pattern description language using all standard C
facilities (include, define, variables, loop, ...). Fonctions provided by genpat are to
be used in a given order. Using them in a different order won't crash the system, but will
result in execution errors. Here follows the description of the input file.

A pat format file can be divided in two parts : declaration and description part.

The declaration part is the list of inputs, outputs, internal signals and registers.
Inputs are to be forced to a certain value and all the others are to be observed during
simulation.

The description part is a set of patterns, where each pattern defines the value of inputs
and outputs. The pattern number represents actually the absolute time for the simulator.

Similarly, a genpat file can be divided in two parts : declaration and description part.
Functions related to the declaration must be called before any function related to the
description part.

declaration part
The first thing you should do in this part is to give the output file's name
(see DEF_GENPAT(3)). Then, this part allows you to declare the inputs, the
outputs, and internal observing points (see DECLAR(3)). It is also possible to
create virtual arraies (see ARRAY(3)).

description part
After all signals are declared, you can begin to define input values which are
to be applied to the inputs of the circuit or output values which are to be
compare with the values produced during the simulation. (see AFFECT(3)). Genpat
describes the stimulus by event : only signal transitions are described. This
part also allows you to give instructions to the simulation tool to save the
state of the circuit at the end of the simulation. (see SAVE(3)). Last thing you
should do in this part is to generate the output file (see SAV_GENPAT(3)).

FUNCTIONS


DEF_GENPAT() defines the output file's name.

SAV_GENPAT() make the output file be generated

DECLAR() declares inputs, outputs, and the internal observing points.

ARRAY() allows signals of the same type to be groupped in an "virtual array" in
order to ease their manipulation

INIT() changes the values of registers between two patterns.

AFFECT() assigns a value to a signal, at a given pattern number. This value is kept
on the signal until a new value is assigned to the signal.

SAVE() informs the simulation tool to save the state of the circuit at the end of
simulation

LABEL() gives a label to the current pattern

GETCPAT() return the number of the current pattern

EXAMPLES


#include <stdio.h>
#include "genpat.h"

char *inttostr(entier)
int entier;
{
char *str;
str = (char *) mbkalloc (32 * sizeof (char));
sprintf (str, "%d",entier);
return(str);
}
/*------------------------------*/
/* end of the description */
/*------------------------------*/

main ()
{
int i;
int j;
int cur_vect = 0;

DEF_GENPAT("example");

/* interface */
DECLAR ("a", ":2", "X", IN, "3 downto 0", "" );
DECLAR ("b", ":2", "X", IN, "3 downto 0", "" );
DECLAR ("s", ":2", "X", OUT, "3 downto 0", "" );
DECLAR ("vdd", ":2", "B", IN, "", "" );
DECLAR ("vss", ":2", "B", IN, "", "" );

LABEL ("adder");
AFFECT ("0", "vdd", "0b1");
AFFECT ("0", "vss", "0b0");

for (i=0; i<16; i++)
{
for (j=0; j<16; j++)
{
AFFECT (inttostr(cur_vect), "a", inttostr(i) );
AFFECT (inttostr(cur_vect), "b", inttostr(j) );
cur_vect++;
}
}

SAV_GENPAT ();
}

ENVIRONMENT VARIABLES


Genpat reads the environment variable VH_PATSFX to give the result file an extension.

Use alliance-genpat online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Psi
    Psi
    Psi is cross-platform powerful XMPP
    client designed for experienced users.
    There are builds available for MS
    Windows, GNU/Linux and macOS.. Audience:
    End Users...
    Download Psi
  • 2
    Blobby Volley 2
    Blobby Volley 2
    Official continuation of the famous
    Blobby Volley 1.x arcade game..
    Audience: End Users/Desktop. User
    interface: OpenGL, SDL. Programming
    Language: C++, Lua. C...
    Download Blobby Volley 2
  • 3
    SuiteCRM
    SuiteCRM
    SuiteCRM is the award-winning Customer
    Relationship Management (CRM)
    application brought to you by authors
    and maintainers, SalesAgility. It is the
    world�s mos...
    Download SuiteCRM
  • 4
    Poweradmin
    Poweradmin
    Poweradmin is a web-based DNS
    administration tool for PowerDNS server.
    The interface has full support for most
    of the features of PowerDNS. It has full
    support...
    Download Poweradmin
  • 5
    Gin Web Framework
    Gin Web Framework
    Gin is an incredibly fast web framework
    written in Golang that can perform up to
    40 times faster, thanks to its
    martini-like API and custom version of
    httprout...
    Download Gin Web Framework
  • 6
    CEREUS LINUX
    CEREUS LINUX
    CEREUS LINUX basado en MX LINUX con
    varios entornos de escritorios. This is
    an application that can also be fetched
    from
    https://sourceforge.net/projects/cereu...
    Download CEREUS LINUX
  • More »

Linux commands

  • 1
    aa-clickquery
    aa-clickquery
    aa-clickquery - program for querying
    click-apparmor DESCRIPTION: This program
    is used to query click-apparmor for
    information. USAGE: aa-clickquery
    --click-fra...
    Run aa-clickquery
  • 2
    aa-exec-click
    aa-exec-click
    aa-exec-click - program for executing
    click packages under confinement
    DESCRIPTION: This program is used to
    execute click package under AppArmor
    confinement. I...
    Run aa-exec-click
  • 3
    cpio
    cpio
    cpio - copy files to and from archives ...
    Run cpio
  • 4
    cpipe
    cpipe
    cpipe - copy stdin to stdout while
    counting bytes and reporting progress ...
    Run cpipe
  • 5
    FvwmSave
    FvwmSave
    FvwmSave - the Fvwm desktop-layout
    saving module ...
    Run FvwmSave
  • 6
    FvwmSave1
    FvwmSave1
    FvwmSave - the FVWM desktop-layout
    saving module ...
    Run FvwmSave1
  • More »

Ad