Add support for putting a single delay from the VPI

This commit is contained in:
Cary R 2014-10-18 15:25:17 -07:00
parent d139142c29
commit a63ca15735
1 changed files with 4 additions and 0 deletions

View File

@ -837,6 +837,7 @@ static void modpath_src_put_delays (vpiHandle ref, p_vpi_delay delays)
typedef unsigned char map_array_t[12];
// Only the first six entries are used for the less than twelve maps.
static const map_array_t map_1 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
static const map_array_t map_2 = {0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0};
static const map_array_t map_3 = {0, 1, 2, 0, 2, 1, 0, 0, 0, 0, 0, 0};
static const map_array_t map_6 = {0, 1, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0};
@ -844,6 +845,9 @@ static void modpath_src_put_delays (vpiHandle ref, p_vpi_delay delays)
const map_array_t*use_map = 0;
switch (delays->no_of_delays) {
case 1:
use_map = &map_1;
break;
case 2:
use_map = &map_2;
break;