Add structural EEQ gates (Stephan Boettcher)
This commit is contained in:
parent
6e703c5744
commit
81536481cc
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: ivl_target.h,v 1.68 2001/06/16 23:45:05 steve Exp $"
|
||||
#ident "$Id: ivl_target.h,v 1.69 2001/06/19 03:01:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
@ -196,6 +196,8 @@ typedef enum ivl_logic_e {
|
|||
IVL_LO_XNOR,
|
||||
IVL_LO_XOR,
|
||||
|
||||
IVL_LO_EEQ,
|
||||
|
||||
IVL_LO_UDP
|
||||
} ivl_logic_t;
|
||||
|
||||
|
|
@ -882,6 +884,9 @@ _END_DECL
|
|||
|
||||
/*
|
||||
* $Log: ivl_target.h,v $
|
||||
* Revision 1.69 2001/06/19 03:01:10 steve
|
||||
* Add structural EEQ gates (Stephan Boettcher)
|
||||
*
|
||||
* Revision 1.68 2001/06/16 23:45:05 steve
|
||||
* Add support for structural multiply in t-dll.
|
||||
* Add code generators and vvp support for both
|
||||
|
|
|
|||
34
t-dll.cc
34
t-dll.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: t-dll.cc,v 1.50 2001/06/18 03:25:20 steve Exp $"
|
||||
#ident "$Id: t-dll.cc,v 1.51 2001/06/19 03:01:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "compiler.h"
|
||||
|
|
@ -528,6 +528,35 @@ void dll_target::logic(const NetLogic*net)
|
|||
scope_add_logic(scope, obj);
|
||||
}
|
||||
|
||||
void dll_target::net_case_cmp(const NetCaseCmp*net)
|
||||
{
|
||||
struct ivl_net_logic_s *obj = new struct ivl_net_logic_s;
|
||||
|
||||
obj->type_ = IVL_LO_EEQ;
|
||||
|
||||
/* Connect all the ivl_nexus_t objects to the pins of the
|
||||
device. */
|
||||
|
||||
obj->npins_ = 3;
|
||||
obj->pins_ = new ivl_nexus_t[obj->npins_];
|
||||
for (unsigned idx = 0 ; idx < obj->npins_ ; idx += 1) {
|
||||
const Nexus*nex = net->pin(idx).nexus();
|
||||
assert(nex->t_cookie());
|
||||
obj->pins_[idx] = (ivl_nexus_t) nex->t_cookie();
|
||||
nexus_log_add(obj->pins_[idx], obj, idx);
|
||||
}
|
||||
|
||||
// assert(net->scope());
|
||||
// ivl_scope_t scope = find_scope(des_.root_, net->scope());
|
||||
// assert(scope);
|
||||
ivl_scope_t scope = des_.root_;
|
||||
|
||||
obj->scope_= scope;
|
||||
obj->name_ = strdup(net->name());
|
||||
|
||||
scope_add_logic(scope, obj);
|
||||
}
|
||||
|
||||
void dll_target::udp(const NetUDP*net)
|
||||
{
|
||||
struct ivl_net_logic_s *obj = new struct ivl_net_logic_s;
|
||||
|
|
@ -1352,6 +1381,9 @@ extern const struct target tgt_dll = { "dll", &dll_target_obj };
|
|||
|
||||
/*
|
||||
* $Log: t-dll.cc,v $
|
||||
* Revision 1.51 2001/06/19 03:01:10 steve
|
||||
* Add structural EEQ gates (Stephan Boettcher)
|
||||
*
|
||||
* Revision 1.50 2001/06/18 03:25:20 steve
|
||||
* RAM_DQ pins are inputs, so connect HiZ to the nexus.
|
||||
*
|
||||
|
|
|
|||
6
t-dll.h
6
t-dll.h
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: t-dll.h,v 1.49 2001/06/16 23:45:05 steve Exp $"
|
||||
#ident "$Id: t-dll.h,v 1.50 2001/06/19 03:01:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "target.h"
|
||||
|
|
@ -60,6 +60,7 @@ struct dll_target : public target_t, public expr_scan_t {
|
|||
bool bufz(const NetBUFZ*);
|
||||
void event(const NetEvent*);
|
||||
void logic(const NetLogic*);
|
||||
void net_case_cmp(const NetCaseCmp*);
|
||||
void udp(const NetUDP*);
|
||||
void lpm_add_sub(const NetAddSub*);
|
||||
void lpm_compare(const NetCompare*);
|
||||
|
|
@ -538,6 +539,9 @@ struct ivl_statement_s {
|
|||
|
||||
/*
|
||||
* $Log: t-dll.h,v $
|
||||
* Revision 1.50 2001/06/19 03:01:10 steve
|
||||
* Add structural EEQ gates (Stephan Boettcher)
|
||||
*
|
||||
* Revision 1.49 2001/06/16 23:45:05 steve
|
||||
* Add support for structural multiply in t-dll.
|
||||
* Add code generators and vvp support for both
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: vvp_scope.c,v 1.35 2001/06/18 03:10:34 steve Exp $"
|
||||
#ident "$Id: vvp_scope.c,v 1.36 2001/06/19 03:01:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vvp_priv.h"
|
||||
|
|
@ -579,6 +579,10 @@ static void draw_logic_in_scope(ivl_net_logic_t lptr)
|
|||
ltype = "XOR";
|
||||
break;
|
||||
|
||||
case IVL_LO_EEQ:
|
||||
ltype = "EEQ";
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "vvp.tgt: error: Unhandled logic type: %u\n",
|
||||
ivl_logic_type(lptr));
|
||||
|
|
@ -1033,6 +1037,9 @@ int draw_scope(ivl_scope_t net, ivl_scope_t parent)
|
|||
|
||||
/*
|
||||
* $Log: vvp_scope.c,v $
|
||||
* Revision 1.36 2001/06/19 03:01:10 steve
|
||||
* Add structural EEQ gates (Stephan Boettcher)
|
||||
*
|
||||
* Revision 1.35 2001/06/18 03:10:34 steve
|
||||
* 1. Logic with more than 4 inputs
|
||||
* 2. Id and name mangling
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: compile.cc,v 1.78 2001/06/18 01:09:32 steve Exp $"
|
||||
#ident "$Id: compile.cc,v 1.79 2001/06/19 03:01:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "arith.h"
|
||||
|
|
@ -373,6 +373,9 @@ void compile_functor(char*label, char*type, unsigned argc, struct symb_s*argv)
|
|||
} else if (strcmp(type, "MUXZ") == 0) {
|
||||
obj->table = ft_MUXZ;
|
||||
|
||||
} else if (strcmp(type, "EEQ") == 0) {
|
||||
obj->table = ft_EEQ;
|
||||
|
||||
} else if (strcmp(type, "NAND") == 0) {
|
||||
obj->table = ft_NAND;
|
||||
|
||||
|
|
@ -1406,6 +1409,9 @@ vvp_ipoint_t debug_lookup_functor(const char*name)
|
|||
|
||||
/*
|
||||
* $Log: compile.cc,v $
|
||||
* Revision 1.79 2001/06/19 03:01:10 steve
|
||||
* Add structural EEQ gates (Stephan Boettcher)
|
||||
*
|
||||
* Revision 1.78 2001/06/18 01:09:32 steve
|
||||
* More behavioral unary reduction operators.
|
||||
* (Stephan Boettcher)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: draw_tt.c,v 1.8 2001/04/29 23:13:34 steve Exp $"
|
||||
#ident "$Id: draw_tt.c,v 1.9 2001/06/19 03:01:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include <stdio.h>
|
||||
|
|
@ -231,6 +231,38 @@ static void draw_MUXZ(void)
|
|||
printf("};\n");
|
||||
}
|
||||
|
||||
static void draw_EEQ(void)
|
||||
{
|
||||
unsigned i0, i1, i2, i3;
|
||||
|
||||
printf("const unsigned char ft_EEQ[64] = {");
|
||||
|
||||
for (i3 = 0 ; i3 < 4 ; i3 += 1)
|
||||
for (i2 = 0 ; i2 < 4 ; i2 += 1) {
|
||||
printf("\n ");
|
||||
for (i1 = 0 ; i1 < 4 ; i1 += 1) {
|
||||
unsigned idx = (i3 << 4) | (i2 << 2) | i1;
|
||||
unsigned char byte = 0;
|
||||
|
||||
for (i0 = 0 ; i0 < 4 ; i0 += 1) {
|
||||
unsigned val;
|
||||
if (i3 != i2)
|
||||
val = 0;
|
||||
else if (i1 != i0)
|
||||
val = 0;
|
||||
else
|
||||
val = 1;
|
||||
|
||||
byte |= val << (i0*2);
|
||||
}
|
||||
|
||||
printf("0x%02x, ", byte);
|
||||
}
|
||||
}
|
||||
|
||||
printf("};\n");
|
||||
}
|
||||
|
||||
static void draw_NOR(void)
|
||||
{
|
||||
unsigned i0, i1, i2, i3;
|
||||
|
|
@ -500,6 +532,7 @@ main()
|
|||
draw_BUFIF0();
|
||||
draw_BUFIF1();
|
||||
draw_MUXZ();
|
||||
draw_EEQ();
|
||||
draw_NAND();
|
||||
draw_NOR();
|
||||
draw_NOT();
|
||||
|
|
@ -513,6 +546,9 @@ main()
|
|||
|
||||
/*
|
||||
* $Log: draw_tt.c,v $
|
||||
* Revision 1.9 2001/06/19 03:01:10 steve
|
||||
* Add structural EEQ gates (Stephan Boettcher)
|
||||
*
|
||||
* Revision 1.8 2001/04/29 23:13:34 steve
|
||||
* Add bufif0 and bufif1 functors.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: functor.h,v 1.24 2001/05/31 04:12:43 steve Exp $"
|
||||
#ident "$Id: functor.h,v 1.25 2001/06/19 03:01:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "pointers.h"
|
||||
|
|
@ -283,6 +283,7 @@ extern const unsigned char ft_BUF[];
|
|||
extern const unsigned char ft_BUFIF0[];
|
||||
extern const unsigned char ft_BUFIF1[];
|
||||
extern const unsigned char ft_MUXZ[];
|
||||
extern const unsigned char ft_EEQ[];
|
||||
extern const unsigned char ft_NAND[];
|
||||
extern const unsigned char ft_NOR[];
|
||||
extern const unsigned char ft_NOT[];
|
||||
|
|
@ -293,6 +294,9 @@ extern const unsigned char ft_var[];
|
|||
|
||||
/*
|
||||
* $Log: functor.h,v $
|
||||
* Revision 1.25 2001/06/19 03:01:10 steve
|
||||
* Add structural EEQ gates (Stephan Boettcher)
|
||||
*
|
||||
* Revision 1.24 2001/05/31 04:12:43 steve
|
||||
* Make the bufif0 and bufif1 gates strength aware,
|
||||
* and accurately propagate strengths of outputs.
|
||||
|
|
|
|||
|
|
@ -54,6 +54,10 @@ normally initialized to 1 and left unconnected. The device is called
|
|||
MUXZ because the x and z values of the A and B inputs are passed
|
||||
through.
|
||||
|
||||
* EEQ
|
||||
|
||||
Compare two pairs of inputs. output = (i1 === i2) && (i3 === i4);
|
||||
|
||||
* NAND
|
||||
|
||||
* NOR
|
||||
|
|
|
|||
Loading…
Reference in New Issue