[ml402]
- testbench: refacored [denano] - testbench: fixed gpio git-svn-id: http://moon:8086/svn/mips@195 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
+1
-3
@@ -1147,13 +1147,11 @@ int main (void)
|
||||
// Init GPIO LED
|
||||
gpio_init(&gpio_led_data, SYS_GPIO_0_DATA, GPIO_0_MASK_LED, GPIO_0_ALIGN_LED);
|
||||
gpio_init(&gpio_led_dir, SYS_GPIO_0_DIR, GPIO_0_MASK_LED, GPIO_0_ALIGN_LED);
|
||||
gpio_set(&gpio_led_dir, GPIO_0_MASK_LED);
|
||||
|
||||
// Init GPIO MDIO
|
||||
gpio_init(&gpio_mdio_data, SYS_GPIO_0_DATA, GPIO_0_MASK_MDIO, GPIO_0_ALIGN_MDIO);
|
||||
gpio_init(&gpio_mdio_dir, SYS_GPIO_0_DIR, GPIO_0_MASK_MDIO, GPIO_0_ALIGN_MDIO);
|
||||
|
||||
// Set GPIO Dirs
|
||||
gpio_set(&gpio_led_dir, GPIO_0_MASK_LED);
|
||||
gpio_set(&gpio_mdio_dir, GPIO_0_MDIO_RST);
|
||||
|
||||
// Reset PHY
|
||||
|
||||
+10
-7
@@ -18,7 +18,8 @@
|
||||
#define TEST16_ERROR (ERROR | 0x1600)
|
||||
|
||||
extern int paranoia(int argc, char **argv);
|
||||
gpio_if_t gpio_if;
|
||||
gpio_if_t gpio_led_data;
|
||||
gpio_if_t gpio_led_dir;
|
||||
|
||||
const uint32_t test_icache_instr[] =
|
||||
{
|
||||
@@ -93,7 +94,7 @@ void handler7(struct xcptcontext *xcp)
|
||||
if (*pTim_stat & 1)
|
||||
{
|
||||
*pTim_stat = 1; // Acknowledge IRQ
|
||||
gpio_write(&gpio_if, GPIO_0_MASK_LED, GPIO_0_ALIGN_LED, GPIO_DATA_OFFSET, g_cnt++);
|
||||
gpio_write(&gpio_led_data, g_cnt++);
|
||||
|
||||
*pTim0_cmp = (uint32_t)(rand() & 0x000FFFFF);
|
||||
*pTim_ctrl |= 1;
|
||||
@@ -887,9 +888,11 @@ int main (void)
|
||||
struct timeval time_sec;
|
||||
|
||||
g_cnt = 1;
|
||||
gpio_init(&gpio_if, SYS_GPIO_0_BASE);
|
||||
gpio_write(&gpio_if, GPIO_0_MASK_LED, GPIO_0_ALIGN_LED, GPIO_DIR_OFFSET, GPIO_0_MASK_LED);
|
||||
|
||||
// Init GPIO LED
|
||||
gpio_init(&gpio_led_data, SYS_GPIO_0_DATA, GPIO_0_MASK_LED, GPIO_0_ALIGN_LED);
|
||||
gpio_init(&gpio_led_dir, SYS_GPIO_0_DIR, GPIO_0_MASK_LED, GPIO_0_ALIGN_LED);
|
||||
gpio_set(&gpio_led_dir, GPIO_0_MASK_LED);
|
||||
|
||||
*pTim0_cnt = 0;
|
||||
*pTim1_cnt = 0;
|
||||
*pTim0_cmp = 0x40000;
|
||||
@@ -958,7 +961,7 @@ int main (void)
|
||||
}
|
||||
}
|
||||
srand(clock());
|
||||
gpio_write(&gpio_if, GPIO_0_MASK_LED, GPIO_0_ALIGN_LED, GPIO_DATA_OFFSET, uncached_cachemiss_bug());
|
||||
gpio_write(&gpio_led_data, uncached_cachemiss_bug());
|
||||
|
||||
Test16_MemTest();
|
||||
|
||||
@@ -983,7 +986,7 @@ int main (void)
|
||||
interrupt_enable(SYS_INT_TIMER);
|
||||
}
|
||||
|
||||
gpio_write(&gpio_if, GPIO_0_MASK_LED, GPIO_0_ALIGN_LED, GPIO_DATA_OFFSET, cnt);
|
||||
gpio_write(&gpio_led_data, cnt);
|
||||
|
||||
printf("-------------------------------------------\n");
|
||||
printf("-- LoadStore ------------------------------\n");
|
||||
|
||||
Reference in New Issue
Block a user