Removed decimation in CPLD

This commit is contained in:
Marco Bartolucci
2017-05-15 12:56:51 +02:00
parent d47dece3ba
commit 747d8e2278
7 changed files with 140 additions and 212 deletions

View File

@ -74,10 +74,10 @@ static struct gpio_t gpio_max5864_select = GPIO(2, 7);
// static struct gpio_t gpio_rffc5072_reset = GPIO(2, 14);
// #endif
static struct gpio_t gpio_sync_in_a = GPIO(3, 10);
static struct gpio_t gpio_sync_in_b = GPIO(3, 11);
static struct gpio_t gpio_sync_out_a = GPIO(3, 8);
static struct gpio_t gpio_sync_out_b = GPIO(3, 9);
//static struct gpio_t gpio_sync_in_a = GPIO(3, 10);
//static struct gpio_t gpio_sync_in_b = GPIO(3, 11);
//static struct gpio_t gpio_sync_out_a = GPIO(3, 8);
//static struct gpio_t gpio_sync_out_b = GPIO(3, 9);
/* RF supply (VAA) control */
#ifdef HACKRF_ONE
@ -824,11 +824,11 @@ void pin_setup(void) {
scu_pinmux(SCU_PINMUX_GPIO3_10, SCU_GPIO_PDN | SCU_CONF_FUNCTION0);
scu_pinmux(SCU_PINMUX_GPIO3_11, SCU_GPIO_PDN | SCU_CONF_FUNCTION0);
gpio_input(&gpio_sync_in_a);
gpio_input(&gpio_sync_in_b);
//gpio_input(&gpio_sync_in_a);
//gpio_input(&gpio_sync_in_b);
gpio_output(&gpio_sync_out_a);
gpio_output(&gpio_sync_out_b);
//gpio_output(&gpio_sync_out_a);
//gpio_output(&gpio_sync_out_b);
#endif
#ifdef RAD1O
@ -841,11 +841,11 @@ void pin_setup(void) {
scu_pinmux(SCU_PINMUX_GPIO3_10, SCU_GPIO_PDN | SCU_CONF_FUNCTION0);
scu_pinmux(SCU_PINMUX_GPIO3_11, SCU_GPIO_PDN | SCU_CONF_FUNCTION0);
gpio_input(&gpio_sync_in_a);
gpio_input(&gpio_sync_in_b);
//gpio_input(&gpio_sync_in_a);
//gpio_input(&gpio_sync_in_b);
gpio_output(&gpio_sync_out_a);
gpio_output(&gpio_sync_out_b);
//gpio_output(&gpio_sync_out_a);
//gpio_output(&gpio_sync_out_b);
#endif
/* enable input on SCL and SDA pins */
@ -902,33 +902,3 @@ void led_off(const led_t led) {
void led_toggle(const led_t led) {
gpio_toggle(&gpio_led[led]);
}
void hw_sync_syn() {
gpio_set(&gpio_sync_out_a);
}
void hw_sync_stop() {
gpio_clear(&gpio_sync_out_a);
gpio_clear(&gpio_sync_out_b);
}
void hw_sync_ack() {
gpio_set(&gpio_sync_out_b);
}
void hw_sync_copy_state() {
if(gpio_read(&gpio_sync_in_a)) {
gpio_set(&gpio_sync_out_a);
} else {
gpio_clear(&gpio_sync_out_a);
}
if(gpio_read(&gpio_sync_in_b)) {
gpio_set(&gpio_sync_out_b);
} else {
gpio_clear(&gpio_sync_out_b);
}
}
bool hw_sync_ready() {
return (gpio_read(&gpio_sync_in_a) && gpio_read(&gpio_sync_in_b));
}

View File

@ -1,5 +1,5 @@
Programmer Jedec Bit Map
Date Extracted: Fri Jul 8 16:10:08 2016
Date Extracted: Mon May 15 12:52:29 2017
QF25812*
QP100*
@ -12,28 +12,28 @@ N DEVICE XC2C64A-7-VQ100*
Note Block 0 *
Note Block 0 ZIA *
L000000 1111111011100111*
L000016 1110101011111111*
L000000 1111111111111111*
L000016 1111111111111111*
L000032 1111111011110011*
L000048 1111111111111111*
L000064 1111111111111111*
L000080 1111111011010111*
L000096 1110101011111111*
L000096 1111111111111111*
L000112 1111111111111111*
L000128 1110101011111111*
L000128 1111111011010111*
L000144 1111111111111111*
L000160 1111111111111111*
L000176 1111111011100111*
L000176 1111111111111111*
L000192 1111111111111111*
L000208 1111111011100111*
L000208 1111111111111111*
L000224 1111111111111111*
L000240 1111111111111111*
L000256 1111111111111111*
L000272 1111111111111111*
L000288 1111111011010111*
L000288 1111111111111111*
L000304 1111111111111111*
L000320 1111111111111111*
L000336 1111111011100111*
L000336 1111111111111111*
L000352 1111111111111111*
L000368 1111111111111111*
L000384 1111111111111111*
@ -54,21 +54,21 @@ L000608 1111111111111111*
L000624 1111111111111111*
Note Block 0 PLA AND array *
L000640 11110111111111111111110111011111111111111111111111111111111111111111111111111111*
L000720 11011011111111111111111111111111111111111111111111111111111111111111111111111111*
L000800 11011111111111111011111011111111111111111111111111111111111111111111111111111111*
L000880 11100111111111110111111011111111111111111111111111111111111111111111111111111111*
L000960 11011111111101111111111111011111111111111111111111111111111111111111111111111111*
L001040 11111011111111111111111111111111111111111111111111111111111111111111111111111111*
L001120 01111111111111110111110111111111111111111111111111111111111111111111111111111111*
L001200 10111111111111111011110111111111111111111111111111111111111111111111111111111111*
L001280 01011111111101110111111111111111111111111111111111111111111111111111111111111111*
L001360 11110111111101111111110111111111111111111110111111111111111111111111111111111111*
L001440 11010111111101110111111111111111111111111110111111111111111111111111111111111111*
L001520 11110111111110111111110111111111111111111101111111111111111111111111111111111111*
L001600 11010111111110110111111011111111111111111111111111111111111111111111111111111111*
L001680 11111011110111111111111111111111111111111111111111111111111111111111111111111111*
L001760 11111111110111111111111111111111111110111111111111111111111111111111111111111111*
L000640 11111111111011111111111111111111111111111111111111111111111111111111111111111111*
L000720 11110111111111110111111111111111111111111111111111111111111111111111111111111111*
L000800 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L000880 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L000960 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L001040 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L001120 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L001200 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L001280 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L001360 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L001440 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L001520 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L001600 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L001680 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L001760 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L001840 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L001920 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L002000 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
@ -100,7 +100,7 @@ L004000 111111111111111111111111111111111111111111111111111111111111111111111111
L004080 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L004160 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L004240 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L004320 11111011111111111111111111111111111110111111111111111111111111111111111111111111*
L004320 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L004400 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L004480 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L004560 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
@ -114,19 +114,19 @@ L005040 111111111111111111111111111111111111111111111111111111111111111111111111
Note Block 0 PLA OR array *
L005120 1111111111111110*
L005136 1111111111111110*
L005152 1111111111111110*
L005168 1111111111111110*
L005184 1111111111111110*
L005200 1111111111111101*
L005216 1111111111111101*
L005232 1111111111111101*
L005248 1111111111111101*
L005264 1111111111111011*
L005280 1111111111111011*
L005296 1111111111111011*
L005312 1111111111111011*
L005328 1111111111101111*
L005344 1111111111101111*
L005152 1111111111111111*
L005168 1111111111111111*
L005184 1111111111111111*
L005200 1111111111111111*
L005216 1111111111111111*
L005232 1111111111111111*
L005248 1111111111111111*
L005264 1111111111111111*
L005280 1111111111111111*
L005296 1111111111111111*
L005312 1111111111111111*
L005328 1111111111111111*
L005344 1111111111111111*
L005360 1111111111111111*
L005376 1111111111111111*
L005392 1111111111111111*
@ -182,18 +182,18 @@ L006205 000001111001111110011111100*
L006232 000001111001111110011111100*
L006259 000001111001111110011111100*
L006286 000001111001111110011111100*
L006313 000001111001100110011111101*
L006340 000001111001100111011111101*
L006367 000101111101110110011111100*
L006394 000101111101110111111111100*
L006421 000101111001110110011111100*
L006313 000001111001111110011111100*
L006340 000001111001111110011111100*
L006367 000001111001111110011111100*
L006394 000001111001111110011111100*
L006421 000001111001100110011111101*
Note Block 1 *
Note Block 1 ZIA *
L006448 1111111111111111*
L006464 1111111011010111*
L006464 1110101011111111*
L006480 1111111011010111*
L006496 1110101011111111*
L006496 1111111011010111*
L006512 1111111011010111*
L006528 1111111011010111*
L006544 1111111111111111*
@ -210,8 +210,8 @@ L006704 1111111011100111*
L006720 1111111111111111*
L006736 1111111111111111*
L006752 1111111111111111*
L006768 1111111111111111*
L006784 1111111011010111*
L006768 1111111011010111*
L006784 1111111111111111*
L006800 1111111111111111*
L006816 1111111111111111*
L006832 1111111111111111*
@ -233,21 +233,21 @@ L007072 1111111111111111*
Note Block 1 PLA AND array *
L007088 11111111110111110111111111111101011111111111111111111111111111111111111111111111*
L007168 11111101111111111111111111111111101111111111111111111111111111111111111111111111*
L007168 11101111111111111111111111111111101111111111111111111111111111111111111111111111*
L007248 11111111110111110111011111111101111111111111111111111111111111111111111111111111*
L007328 11111101111111111111101111111111111111111111111111111111111111111111111111111111*
L007328 11101111111111111111101111111111111111111111111111111111111111111111111111111111*
L007408 11111111110111110101111111111101111111111111111111111111111111111111111111111111*
L007488 11111101111111111110111111111111111111111111111111111111111111111111111111111111*
L007568 11111111110111110111111111111101111111111101111111111111111111111111111111111111*
L007648 11111101111111111111111111111111111111111110111111111111111111111111111111111111*
L007488 11101111111111111110111111111111111111111111111111111111111111111111111111111111*
L007568 11111101110111110111111111111101111111111111111111111111111111111111111111111111*
L007648 11101110111111111111111111111111111111111111111111111111111111111111111111111111*
L007728 11111111010111110111111111111101111111111111111111111111111111111111111111111111*
L007808 11111101101111111111111111111111111111111111111111111111111111111111111111111111*
L007808 11101111101111111111111111111111111111111111111111111111111111111111111111111111*
L007888 11110111110111110111111111111101111111111111111111111111111111111111111111111111*
L007968 11111001111111111111111111111111111111111111111111111111111111111111111111111111*
L008048 11011111110111110111111111111101111111111111111111111111111111111111111111111111*
L008128 11101101111111111111111111111111111111111111111111111111111111111111111111111111*
L007968 11101011111111111111111111111111111111111111111111111111111111111111111111111111*
L008048 11111111110111110111111111111101111111110111111111111111111111111111111111111111*
L008128 11101111111111111111111111111111111111111011111111111111111111111111111111111111*
L008208 11111111110111110111111111110101111111111111111111111111111111111111111111111111*
L008288 11111101111111111111111111111011111111111111111111111111111111111111111111111111*
L008288 11101111111111111111111111111011111111111111111111111111111111111111111111111111*
L008368 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L008448 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L008528 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
@ -284,10 +284,10 @@ L010928 111111111111111111111111111111111111111111111111111111111111111111111111
L011008 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L011088 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L011168 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L011248 11111101111111111111111111111111111111111111111111111111111111111111111111111111*
L011248 11011111111111111111111111111111111111111111111111111111111111111111111111111111*
L011328 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L011408 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L011488 11111101111111111111111111111111111111111111111111111111111111111111111111111111*
L011488 11011111111111111111111111111111111111111111111111111111111111111111111111111111*
Note Block 1 PLA OR array *
L011568 1111111111111011*
@ -363,39 +363,39 @@ L012734 000101111001111101100000011*
L012761 000101111001111101100000011*
L012788 000101111001111101100000011*
L012815 000101111001111101100000011*
L012842 000101111001111100100000011*
L012869 000101111001111100100000011*
L012842 000101111001111101000000011*
L012869 000101111001111101000000011*
Note Block 2 *
Note Block 2 ZIA *
L012896 1111111111111111*
L012912 1110101011111111*
L012912 1111111111111111*
L012928 1111111011110011*
L012944 1111111111111111*
L012960 1111111010110111*
L012976 1111111011010111*
L012992 1110101011111111*
L012992 1111111010110111*
L013008 0110111011111111*
L013024 1110101011111111*
L013024 1111111010110111*
L013040 1111111010110111*
L013056 1110101011111111*
L013072 1111111010110111*
L013088 1111111010110111*
L013056 1111111010110111*
L013072 1111111011010111*
L013088 1111111011010111*
L013104 1111111111111111*
L013120 1100111011111111*
L013136 1111111011010111*
L013152 1111111111111111*
L013168 1111111111111111*
L013184 1111111111111111*
L013184 1111111011010111*
L013200 1111111111111111*
L013216 1111111111111111*
L013232 1111111111111111*
L013248 1111111111111111*
L013264 1111111011010111*
L013280 1111111011010111*
L013264 1111111111111111*
L013280 1111111111111111*
L013296 1111111111111111*
L013312 1111111111111111*
L013328 1111111010110111*
L013328 1111111111111111*
L013344 1111111111111111*
L013360 1111111111111111*
L013376 1111111111111111*
@ -411,28 +411,28 @@ L013520 1111111111111111*
Note Block 2 PLA AND array *
L013536 11110111110111011111111111111111111111111111111111111111111111111011111111111111*
L013616 11011011111001010111111111111111111111111111111111111111111111111011111111111111*
L013616 11111011111011011111111111111111111111111111111111111111111111111011111111111111*
L013696 11110111111011111111111111110111111111111111111111111111111111111111111111111111*
L013776 11111011110111111111111111110111111111111111111111111111111111111111111111111111*
L013856 11111111111111111101011111111111111111111111111111111111111111111111111111111111*
L013936 11111111111111111110101111111111111111111111111111111111111111111111111111111111*
L014016 11111111111111111111011111111111111111111111111111111101111111111111111111111111*
L013856 11111011111111111111111111111111111110111111111111111111111111111111111111111111*
L013936 11111011111111111111111101111111111110111111111111111111111111111111111111111111*
L014016 11111111111111111111111110111111111101111111111111111111111111111111111111111111*
L014096 11111111111011111111111111111111111111111111111111111111111111111111111111111111*
L014176 11111111111111111111101111111111111111111111111111111110111111111111111111111111*
L014256 11111111011111111111011111111111111111111111111111111111111111111111111111111111*
L014336 11111111101111111111101111111111111111111111111111111111111111111111111111111111*
L014416 11111111111111111111011101111111111111111111111111111111111111111111111111111111*
L014496 11111111111111111111101110111111111111111111111111111111111111111111111111111111*
L014576 11111111111111111111010111111111111111111111111111111111111111111111111111111111*
L014656 11111111111111111111101011111111111111111111111111111111111111111111111111111111*
L014736 11111111111111111111011111111111111111111111110111111111111111111111111111111111*
L014816 11111111111111111111101111111111111111111111111011111111111111111111111111111111*
L014896 11111111111111111111011111111101111111111111111111111111111111111111111111111111*
L014976 11111111111111111111101111111110111111111111111111111111111111111111111111111111*
L015056 11111111111111111111011111111111111111111111111110111111111111111111111111111111*
L015136 11111111111111111111101111111111111111111111111101111111111111111111111111111111*
L014176 11110111111111111111111110111111111111111111111111111111111111111111111111111111*
L014256 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L014336 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L014416 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L014496 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L014576 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L014656 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L014736 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L014816 11111111111111111101111111111111111111111111111111111111111111111111111111111111*
L014896 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L014976 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L015056 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L015136 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L015216 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L015296 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L015296 11111111111101111111111111111111111111111111111111111111111111111111111111111111*
L015376 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L015456 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L015536 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
@ -444,10 +444,10 @@ L015936 111111111111111111111111111111111111111111111111111111111111111111111111
L016016 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L016096 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L016176 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L016256 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L016256 11111111011111111111111111111111111111111111111111111111111111111111111111111111*
L016336 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L016416 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L016496 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L016496 11111111111111110111111111111111111111111111111111111111111111111111111111111111*
L016576 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L016656 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L016736 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
@ -459,36 +459,36 @@ L017136 111111111111111111111111111111111111111111111111111111111111111111111111
L017216 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L017296 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L017376 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L017456 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L017456 11111111111111111111011111111111111111111111111111111111111111111111111111111111*
L017536 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L017616 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L017696 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L017696 11111111111111111111110111111111111111111111111111111111111111111111111111111111*
L017776 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L017856 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L017936 11111111111111111111111111111111111111111111111111111111111111111111111111111111*
L017936 11111111111111111111111111111101111111111111111111111111111111111111111111111111*
Note Block 2 PLA OR array *
L018016 0111111111111111*
L018032 0111111111111111*
L018048 0111111111111111*
L018064 0111111111111111*
L018080 1101111111111111*
L018096 1101111111111111*
L018112 1111011111111111*
L018080 1101011100111000*
L018096 1111110111111111*
L018112 1111110111111111*
L018128 1111111111111111*
L018144 1111011111111111*
L018160 1111111101111111*
L018176 1111111101111111*
L018192 1111111110111111*
L018208 1111111110111111*
L018224 1111111111111011*
L018240 1111111111111011*
L018256 1111111111111101*
L018272 1111111111111101*
L018288 1111111111111110*
L018304 1111111111111110*
L018320 1111110111111111*
L018336 1111110111111111*
L018144 1111110111111111*
L018160 1111111111111111*
L018176 1111111111111111*
L018192 1111111111111111*
L018208 1111111111111111*
L018224 1111111111111111*
L018240 1111111111111111*
L018256 1111111111111111*
L018272 1111111111111111*
L018288 1111111111111111*
L018304 1111111111111111*
L018320 1111111111111111*
L018336 1111111111111111*
L018352 1111111111111111*
L018368 1111111111111111*
L018384 1111111111111111*
@ -528,21 +528,21 @@ L018896 1111111111111111*
Note Block 2 I/O Macrocell Configuration 27 bits *
N Aclk ClkOp Clk:2 ClkFreq R:2 P:2 RegMod:2 INz:2 FB:2 InReg St XorIn:2 RegCom Oe:4 Tm Slw Pu*
L018912 000101111001110100000000011*
L018939 000001111000011100011111100*
L018966 000101111000011101101000111*
L018993 000001111000011100011111100*
L019020 000101111000011101101000111*
L019047 000001111000011100011111100*
L019074 000101111000011101101000111*
L018939 000001111001111110011111100*
L018966 000101111000011101001000111*
L018993 000001111001111110011111100*
L019020 000101111000011101001000111*
L019047 000001111001111110011111100*
L019074 000101111000011100001000111*
L019101 000001111000011100011111100*
L019128 000101111000011101101000111*
L019155 000101111000011101101000111*
L019128 000101111000011101001000111*
L019155 000101111000011101001000111*
L019182 000001111000011100011111100*
L019209 000001111000011100011111100*
L019236 000001111001111110011111100*
L019263 000101111000011101101000111*
L019290 000101111000011101101000111*
L019317 000101111000011101101000111*
L019263 000101111000011101001000111*
L019290 000101111000011101001000111*
L019317 000101111000011101001000111*
Note Block 3 *
Note Block 3 ZIA *
@ -753,5 +753,5 @@ L025810 0*
Note I/O Bank 1 Vcco *
L025811 0*
CF7BB*
AA74
C0C4E*
AACE

View File

@ -58,9 +58,6 @@ NET "HOST_DATA<4>" LOC = "P67" | IOSTANDARD = LVCMOS33 | SLEW = SLOW ;
NET "HOST_DATA<5>" LOC = "P64" | IOSTANDARD = LVCMOS33 | SLEW = SLOW ;
NET "HOST_DATA<6>" LOC = "P61" | IOSTANDARD = LVCMOS33 | SLEW = SLOW ;
NET "HOST_DATA<7>" LOC = "P77" | IOSTANDARD = LVCMOS33 | SLEW = SLOW ;
NET "HOST_DECIM_SEL<0>" LOC = "P90" | IOSTANDARD = LVCMOS33 ;
NET "HOST_DECIM_SEL<1>" LOC = "P81" | IOSTANDARD = LVCMOS33 ;
NET "HOST_DECIM_SEL<2>" LOC = "P78" | IOSTANDARD = LVCMOS33 ;
NET "HOST_DIRECTION" LOC = "P71" | IOSTANDARD = LVCMOS33 ;
NET "HOST_DISABLE" LOC = "P76" | IOSTANDARD = LVCMOS33 ;
NET "HOST_Q_INVERT" LOC = "P70" | IOSTANDARD = LVCMOS33 ;

View File

@ -34,7 +34,6 @@ entity top is
HOST_SYNC : in std_logic;
HOST_DISABLE : in std_logic;
HOST_DIRECTION : in std_logic;
HOST_DECIM_SEL : in std_logic_vector(2 downto 0);
HOST_Q_INVERT : in std_logic;
DA : in std_logic_vector(7 downto 0);
@ -65,10 +64,6 @@ architecture Behavioral of top is
signal data_from_host_i : std_logic_vector(7 downto 0);
signal data_to_host_o : std_logic_vector(7 downto 0);
signal decimate_count : std_logic_vector(2 downto 0) := "111";
signal decimate_sel_i : std_logic_vector(2 downto 0);
signal decimate_en : std_logic;
signal q_invert : std_logic;
signal rx_q_invert_mask : std_logic_vector(7 downto 0);
signal tx_q_invert_mask : std_logic_vector(7 downto 0);
@ -100,31 +95,14 @@ begin
data_from_host_i <= HOST_DATA;
HOST_CAPTURE <= host_data_capture_o;
host_sync_i <= HOST_SYNC;
HOST_SYNC_CMD <= host_sync_o;
host_sync_i <= HOST_SYNC;
HOST_SYNC_CMD <= host_sync_o;
host_data_enable_i <= not HOST_DISABLE;
transfer_direction_i <= to_dac when HOST_DIRECTION = '1'
else from_adc;
decimate_sel_i <= HOST_DECIM_SEL;
------------------------------------------------
decimate_en <= '1' when decimate_count = "111" else '0';
process(host_clk_i)
begin
if rising_edge(host_clk_i) then
if codec_clk_i = '1' then
if decimate_count = "111" or host_data_enable_i = '0' then
decimate_count <= decimate_sel_i;
else
decimate_count <= decimate_count + 1;
end if;
end if;
end if;
end process;
q_invert <= HOST_Q_INVERT;
rx_q_invert_mask <= X"80" when q_invert = '1' else X"7f";
@ -179,7 +157,7 @@ begin
end if;
else
if codec_clk_i = '0' then
host_data_capture_o <= host_data_enable_i and decimate_en and host_sync_latched;
host_data_capture_o <= host_data_enable_i and host_sync_latched;
end if;
end if;
end if;

View File

@ -206,8 +206,6 @@ int main(void) {
sweep_mode();
}
start_streaming_on_hw_sync();
// Set up IN transfer of buffer 0.
if ( usb_bulk_buffer_offset >= 16384
&& phase == 1

View File

@ -269,20 +269,16 @@ void set_transceiver_mode(const transceiver_mode_t new_transceiver_mode) {
led_off(LED3);
rf_path_set_direction(&rf_path, RF_PATH_DIRECTION_OFF);
vector_table.irq[NVIC_SGPIO_IRQ] = sgpio_isr_rx;
hw_sync_stop();
}
hw_sync_stop();
if( _transceiver_mode != TRANSCEIVER_MODE_OFF ) {
si5351c_activate_best_clock_source(&clock_gen);
if( _hw_sync_mode != HW_SYNC_MODE_OFF) {
hw_sync_syn();
} else {
baseband_streaming_enable(&sgpio_config);
hw_sync_enable();
}
baseband_streaming_enable(&sgpio_config);
}
}
@ -323,14 +319,3 @@ usb_request_status_t usb_vendor_request_set_hw_sync_mode(
return USB_REQUEST_STATUS_OK;
}
}
void start_streaming_on_hw_sync()
{
if( _hw_sync_mode != HW_SYNC_MODE_OFF) {
while(!hw_sync_ready()) { }
hw_sync_ack();
led_on(LED3);
baseband_streaming_enable(&sgpio_config);
}
}