Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
diglog
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de conteneurs
Registre de modèles
Opération
Environnements
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Etienne BRATEAU
diglog
Validations
e7a0da57
Valider
e7a0da57
rédigé
Il y a 6 ans
par
Etienne BRATEAU
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
reindent logsimasm
parent
a4d69e9e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
src/logsimasm.c
+28
-32
28 ajouts, 32 suppressions
src/logsimasm.c
avec
28 ajouts
et
32 suppressions
src/logsimasm.c
+
28
−
32
Voir le fichier @
e7a0da57
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* C equivalent code for the assembly-language portions of logsim.
/* C equivalent code for the assembly-language portions of logsim.
...
@@ -31,8 +32,8 @@
...
@@ -31,8 +32,8 @@
#include
"logsima.h"
#include
"logsima.h"
#include
"node.h"
#include
"node.h"
#include
"logstuff.h"
static
int
trace_16
=
0
;
#define trace_16 (logsima_action.lact->quiet ? -1 : 0)
#define trace_16 (logsima_action.lact->quiet ? -1 : 0)
#define TRACE_ENBL 0
#define TRACE_ENBL 0
...
@@ -44,14 +45,9 @@ static int trace_16 = 0;
...
@@ -44,14 +45,9 @@ static int trace_16 = 0;
extern
int
findprocedure
(
char
*
name
,
void
(
**
start
)());
static
int
callcache_next
;
static
int
callcache_next
;
static
void
(
*
callcache
[
255
-
32
])(
log_16_action
*
);
/* first 32 are unused */
static
void
(
*
callcache
[
255
-
32
])(
log_16_action
*
);
/* first 32 are unused */
static
void
nullproc_16
(
log_16_action
*
act
)
static
void
nullproc_16
(
log_16_action
*
act
)
{
{
/* do nothing */
/* do nothing */
...
@@ -98,7 +94,7 @@ void copynodes(log_nrec *n, int *stable)
...
@@ -98,7 +94,7 @@ void copynodes(log_nrec *n, int *stable)
if
((
nip
->
truev
=
newv
=
nip
->
v0
)
==
log_none
)
if
((
nip
->
truev
=
newv
=
nip
->
v0
)
==
log_none
)
newv
=
nip
->
defv
;
newv
=
nip
->
defv
;
if
(
TRACE_COPY
)
if
(
TRACE_COPY
)
nc_printf
(
"Setting node %
x
to %d
\n
"
,
(
unsigned
int
)
nip
,
newv
);
nc_printf
(
"Setting node %
p
to %d
\n
"
,
nip
,
newv
);
if
(
newv
!=
(
nip
->
v00
=
nip
->
v
))
if
(
newv
!=
(
nip
->
v00
=
nip
->
v
))
{
{
nip
->
v
=
newv
;
nip
->
v
=
newv
;
...
@@ -359,7 +355,7 @@ static log_16_value g_expr()
...
@@ -359,7 +355,7 @@ static log_16_value g_expr()
case
0xb0
:
/* high pin */
case
0xb0
:
/* high pin */
nip
=
g_pins
[
*
g_proc
++
]
->
info
;
nip
=
g_pins
[
*
g_proc
++
]
->
info
;
if
(
TRACE_VAL
)
nc_printf
(
" Value of %
x
is %d
\n
"
,
(
unsigned
int
)
nip
,
(
int
)
nip
->
v
-
1
);
if
(
TRACE_VAL
)
nc_printf
(
" Value of %
p
is %d
\n
"
,
nip
,
(
int
)
nip
->
v
-
1
);
return
nip
->
v
;
return
nip
->
v
;
case
0xb1
:
/* STRONG */
case
0xb1
:
/* STRONG */
...
@@ -369,7 +365,7 @@ static log_16_value g_expr()
...
@@ -369,7 +365,7 @@ static log_16_value g_expr()
case16
(
0xc0
)
:
/* pin */
case16
(
0xc0
)
:
/* pin */
case16
(
0xd0
)
:
case16
(
0xd0
)
:
nip
=
g_pins
[
ch
&
0x1f
]
->
info
;
nip
=
g_pins
[
ch
&
0x1f
]
->
info
;
if
(
TRACE_VAL
)
nc_printf
(
" Value of %
x
is %d
\n
"
,
(
unsigned
int
)
nip
,
(
int
)
nip
->
v
-
1
);
if
(
TRACE_VAL
)
nc_printf
(
" Value of %
p
is %d
\n
"
,
nip
,
(
int
)
nip
->
v
-
1
);
return
nip
->
v
;
return
nip
->
v
;
case16
(
0xe0
)
:
/* var */
case16
(
0xe0
)
:
/* var */
...
@@ -571,7 +567,7 @@ out_node:
...
@@ -571,7 +567,7 @@ out_node:
{
{
case
log_zero
:
case
log_zero
:
nip
=
np
->
info
;
nip
=
np
->
info
;
if
(
TRACE_VAL
)
nc_printf
(
" Output 0 to %
x
(was %d)
\n
"
,
(
unsigned
int
)
nip
,
nip
->
v0
);
if
(
TRACE_VAL
)
nc_printf
(
" Output 0 to %
p
(was %d)
\n
"
,
nip
,
nip
->
v0
);
if
(
nip
->
v0
==
log_one
)
if
(
nip
->
v0
==
log_one
)
record_conflict
(
np
);
record_conflict
(
np
);
else
else
...
@@ -580,7 +576,7 @@ out_node:
...
@@ -580,7 +576,7 @@ out_node:
case
log_one
:
case
log_one
:
nip
=
np
->
info
;
nip
=
np
->
info
;
if
(
TRACE_VAL
)
nc_printf
(
" Output 1 to %
x
(was %d)
\n
"
,
(
unsigned
int
)
nip
,
nip
->
v0
);
if
(
TRACE_VAL
)
nc_printf
(
" Output 1 to %
p
(was %d)
\n
"
,
nip
,
nip
->
v0
);
if
(
nip
->
v0
==
log_zero
)
if
(
nip
->
v0
==
log_zero
)
record_conflict
(
np
);
record_conflict
(
np
);
else
else
...
@@ -600,7 +596,7 @@ oc_out_node:
...
@@ -600,7 +596,7 @@ oc_out_node:
if
(
g_expr
()
==
log_zero
)
if
(
g_expr
()
==
log_zero
)
{
{
nip
=
np
->
info
;
nip
=
np
->
info
;
if
(
TRACE_VAL
)
nc_printf
(
" Output 0 to %
x
(was %d)
\n
"
,
(
unsigned
int
)
nip
,
nip
->
v0
);
if
(
TRACE_VAL
)
nc_printf
(
" Output 0 to %
p
(was %d)
\n
"
,
nip
,
nip
->
v0
);
if
(
nip
->
v0
==
log_one
)
if
(
nip
->
v0
==
log_one
)
record_conflict
(
np
);
record_conflict
(
np
);
else
else
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter