bmc: Make the second part of the data set comparison algorithm public.
This code will be shared by future alternative algorithms. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
1b3ef0d195
commit
dc1b7c66c6
7
bmc.c
7
bmc.c
|
@ -21,12 +21,7 @@
|
||||||
#include "bmc.h"
|
#include "bmc.h"
|
||||||
#include "ds.h"
|
#include "ds.h"
|
||||||
|
|
||||||
#define A_BETTER_TOPO 2
|
int dscmp2(struct dataset *a, struct dataset *b)
|
||||||
#define A_BETTER 1
|
|
||||||
#define B_BETTER -1
|
|
||||||
#define B_BETTER_TOPO -2
|
|
||||||
|
|
||||||
static int dscmp2(struct dataset *a, struct dataset *b)
|
|
||||||
{
|
{
|
||||||
int diff;
|
int diff;
|
||||||
unsigned int A = a->stepsRemoved, B = b->stepsRemoved;
|
unsigned int A = a->stepsRemoved, B = b->stepsRemoved;
|
||||||
|
|
11
bmc.h
11
bmc.h
|
@ -24,6 +24,11 @@
|
||||||
#include "port.h"
|
#include "port.h"
|
||||||
#include "fsm.h"
|
#include "fsm.h"
|
||||||
|
|
||||||
|
#define A_BETTER_TOPO 2
|
||||||
|
#define A_BETTER 1
|
||||||
|
#define B_BETTER -1
|
||||||
|
#define B_BETTER_TOPO -2
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BMC state decision algorithm.
|
* BMC state decision algorithm.
|
||||||
* @param c The local clock.
|
* @param c The local clock.
|
||||||
|
@ -44,4 +49,10 @@ enum port_state bmc_state_decision(struct clock *c, struct port *r,
|
||||||
*/
|
*/
|
||||||
int dscmp(struct dataset *a, struct dataset *b);
|
int dscmp(struct dataset *a, struct dataset *b);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Second part of the data set comparison algorithm, not for general
|
||||||
|
* public use.
|
||||||
|
*/
|
||||||
|
int dscmp2(struct dataset *a, struct dataset *b);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue