Code and comment cleanup for latches in target interface.
This commit is contained in:
parent
d7736d7eba
commit
5dfc9fdefb
14
ivl_target.h
14
ivl_target.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_ivl_target_H
|
||||
#define IVL_ivl_target_H
|
||||
/*
|
||||
* Copyright (c) 2000-2015 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2016 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -315,6 +315,7 @@ typedef enum ivl_lpm_type_e {
|
|||
IVL_LPM_CMP_NEE= 19, /* Case NE (!==) */
|
||||
IVL_LPM_DIVIDE = 12,
|
||||
IVL_LPM_FF = 3,
|
||||
IVL_LPM_LATCH = 40,
|
||||
IVL_LPM_MOD = 13,
|
||||
IVL_LPM_MULT = 4,
|
||||
IVL_LPM_MUX = 5,
|
||||
|
|
@ -336,8 +337,7 @@ typedef enum ivl_lpm_type_e {
|
|||
IVL_LPM_SUB = 8,
|
||||
IVL_LPM_SUBSTITUTE=39,
|
||||
/* IVL_LPM_RAM = 9, / obsolete */
|
||||
IVL_LPM_UFUNC = 14,
|
||||
IVL_LPM_LATCH = 40
|
||||
IVL_LPM_UFUNC = 14
|
||||
} ivl_lpm_type_t;
|
||||
|
||||
/* The path edge type is the edge type used to select a specific
|
||||
|
|
@ -1310,13 +1310,13 @@ extern unsigned ivl_lpm_lineno(ivl_lpm_t net);
|
|||
* inputs and the Q. All the types must be exactly the same.
|
||||
*
|
||||
* - D-FlipFlop (IVL_LPM_FF)
|
||||
* This data is an edge sensitive register. The ivl_lpm_q output and
|
||||
* single ivl_lpm_data input are the same with, ivl_lpm_width. This
|
||||
* This device is an edge sensitive register. The ivl_lpm_q output and
|
||||
* single ivl_lpm_data input are the same width, ivl_lpm_width. This
|
||||
* device carries a vector like other LPM devices.
|
||||
*
|
||||
* - Latch (IVL_LPM_LATCH)
|
||||
* This data is an asynchronous latch. The ivl_lpm_q output and
|
||||
* single ivl_lpm_data input are the same with, ivl_lpm_width. This
|
||||
* This device is an asynchronous latch. The ivl_lpm_q output and
|
||||
* single ivl_lpm_data input are the same width, ivl_lpm_width. This
|
||||
* device carries a vector like other LPM devices.
|
||||
*
|
||||
* - Memory port (IVL_LPM_RAM) (deprecated in favor of IVL_LPM_ARRAY)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000-2015 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2016 Stephen Williams (steve@icarus.com)
|
||||
* Copyright CERN 2013 / Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
|
|
@ -1149,7 +1149,7 @@ extern "C" ivl_nexus_t ivl_lpm_enable(ivl_lpm_t net)
|
|||
case IVL_LPM_FF:
|
||||
return net->u_.ff.we;
|
||||
case IVL_LPM_LATCH:
|
||||
return net->u_.latch.we;
|
||||
return net->u_.latch.e;
|
||||
default:
|
||||
assert(0);
|
||||
return 0;
|
||||
|
|
|
|||
14
t-dll.cc
14
t-dll.cc
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000-2015 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2016 Stephen Williams (steve@icarus.com)
|
||||
* Copyright CERN 2013 / Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
|
|
@ -2066,17 +2066,11 @@ void dll_target::lpm_latch(const NetLatch*net)
|
|||
|
||||
const Nexus*nex;
|
||||
|
||||
/* If there is a clock enable, then connect it up to the FF
|
||||
device. */
|
||||
if (net->pin_Enable().is_linked()) {
|
||||
nex = net->pin_Enable().nexus();
|
||||
assert(nex->t_cookie());
|
||||
obj->u_.latch.we = nex->t_cookie();
|
||||
assert(obj->u_.latch.we);
|
||||
nexus_lpm_add(obj->u_.latch.we, obj, 0, IVL_DR_HiZ, IVL_DR_HiZ);
|
||||
} else {
|
||||
obj->u_.latch.we = 0;
|
||||
}
|
||||
obj->u_.latch.e = nex->t_cookie();
|
||||
assert(obj->u_.latch.e);
|
||||
nexus_lpm_add(obj->u_.latch.e, obj, 0, IVL_DR_HiZ, IVL_DR_HiZ);
|
||||
|
||||
nex = net->pin_Q().nexus();
|
||||
assert(nex->t_cookie());
|
||||
|
|
|
|||
5
t-dll.h
5
t-dll.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_t_dll_H
|
||||
#define IVL_t_dll_H
|
||||
/*
|
||||
* Copyright (c) 2000-2015 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2016 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -390,8 +390,7 @@ struct ivl_lpm_s {
|
|||
ivl_expr_t sset_value;
|
||||
} ff;
|
||||
struct ivl_lpm_latch_s {
|
||||
unsigned negedge_flag :1;
|
||||
ivl_nexus_t we;
|
||||
ivl_nexus_t e;
|
||||
union {
|
||||
ivl_nexus_t*pins;
|
||||
ivl_nexus_t pin;
|
||||
|
|
|
|||
Loading…
Reference in New Issue