sw: Create function to determine whether an output is driven
This commit is contained in:
parent
953818f43c
commit
98a7a5d170
@ -61,6 +61,11 @@ static int ROUTE_BITMAP[8] = {
|
|||||||
static int BIT_LED_LUT_IN = 28;
|
static int BIT_LED_LUT_IN = 28;
|
||||||
static int BIT_LED_LUT_OUT_N = 29; /* Low-active */
|
static int BIT_LED_LUT_OUT_N = 29; /* Low-active */
|
||||||
|
|
||||||
|
static inline int fpga_cell_lut34_is_driven(char drive_sel)
|
||||||
|
{
|
||||||
|
return (drive_sel != LUT_OUT_DC && drive_sel != LUT_OUT_Z);
|
||||||
|
}
|
||||||
|
|
||||||
static int fpga_cell_lut34_lut_get_mux(int lut, char port) {
|
static int fpga_cell_lut34_lut_get_mux(int lut, char port) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -88,11 +93,9 @@ static int fpga_cell_lut34_lut_get_out_mux(int lut_group, char *ports) {
|
|||||||
ports = ports + lut;
|
ports = ports + lut;
|
||||||
|
|
||||||
for (i = 0; i < 4; ++i) {
|
for (i = 0; i < 4; ++i) {
|
||||||
if (ports[0] == LUT_OUT_DC ||
|
if (!fpga_cell_lut34_is_driven(ports[0]) ||
|
||||||
ports[0] == LUT_OUT_Z ||
|
|
||||||
ports[0] == LUT_OUT_MUX[lut][i]) {
|
ports[0] == LUT_OUT_MUX[lut][i]) {
|
||||||
if (ports[1] == LUT_OUT_DC ||
|
if (!fpga_cell_lut34_is_driven(ports[1]) ||
|
||||||
ports[1] == LUT_OUT_Z ||
|
|
||||||
ports[1] == LUT_OUT_MUX[lut + 1][i])
|
ports[1] == LUT_OUT_MUX[lut + 1][i])
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user