OpenCores
URL https://opencores.org/ocsvn/nfhc/nfhc/trunk

Subversion Repositories nfhc

[/] [nfhc/] [trunk/] [sha256/] [romk.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 arif_endro
#include <stdio.h>
2
#include "genpat.h"
3
 
4
char *inttostr(entier)
5
int entier;
6
 {
7
 char *str;
8
 str = (char *) mbkalloc (32 * sizeof (char));
9
 sprintf (str, "%d",entier);
10
 return(str);
11
 }
12
 
13
main ()
14
{
15
int i;
16
int cur_vect = 0;
17
 
18
DEF_GENPAT("romk");
19
SETTUNIT("ns");
20
 
21
/* interface */
22
DECLAR ("addr",":2", "X", IN , "5  downto 0", "" );
23
DECLAR ("k"  , ":2", "X", OUT, "31 downto 0", "" );
24
DECLAR ("vss", ":1", "B", IN , ""           , "" );
25
DECLAR ("vdd", ":1", "B", IN , ""           , "" );
26
 
27
AFFECT ("0", "vss", "0b0");
28
AFFECT ("0", "vdd", "0b1");
29
AFFECT ("0","addr", "0b000000");
30
 
31
for (i=1; i<0x80; i++) {
32
  AFFECT ("+10", "addr", inttostr(i%0x40) );
33
  cur_vect++;
34
}
35
 
36
SAV_GENPAT ();
37
}
38
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.