+vhdl work "util_pkg.vhd"
vhdl work "tumbl/mbl_pkg.vhd"
vhdl work "lx_rocon_pkg.vhd"
vhdl work "xilinx_dualport_bram_write_first.vhd"
vhdl work "dff2.vhd"
vhdl work "xilinx_dualport_bram_no_change.vhd"
-vhdl work "util_pkg.vhd"
vhdl work "tumbl/mem.vhd"
vhdl work "tumbl/fetch.vhd"
vhdl work "tumbl/exeq.vhd"
-- Clock process definitions
-- clk_cpu_process :process
-- begin
--- clk_cpu <= '0';
--- wait for clk_period_cpu/2;
-- clk_cpu <= '1';
-- wait for clk_period_cpu/2;
+-- clk_cpu <= '0';
+-- wait for clk_period_cpu/2;
-- end process;
clk_50m_process :process
begin
- clk_50m <= '0';
- wait for clk_period_50m/2;
clk_50m <= '1';
wait for clk_period_50m/2;
+ clk_50m <= '0';
+ wait for clk_period_50m/2;
end process;
static int usb_tumbl_pkt_wr(struct usb_ep_t *ep, int len, int code)
{
unsigned char *ptr = ep->ptr - len;
-
+
appl_fpga_tumbl_write(ep->user_data, ptr, len);
-
+
ep->user_data += len;
ep->ptr = ep0_buffer;
return USB_COMPLETE_OK;
uint16_t appl_usb_vendor_call(uint16_t command, uint16_t argument)
{
int i, j;
-
+
switch (command)
{
case USB_CMD_FPGA_CONFIGURE:
case USB_CMD_FPGA_TUMBL_SET_RESET:
return appl_fpga_tumbl_set_reset(argument);
-
+
case USB_CMD_FPGA_TUMBL_SET_HALT:
return appl_fpga_tumbl_set_halt(argument);
-
+
case USB_CMD_FPGA_TUMBL_SET_TRACE:
return appl_fpga_tumbl_set_trace(argument);
-
+
case USB_CMD_FPGA_TUMBL_KICK_TRACE:
return appl_fpga_tumbl_kick_trace();
-
+
case USB_CMD_FPGA_TUMBL_GET_PC:
printf("Tubml PC: 0x%08X\n", (unsigned int) *tumbl_pc);
return 0;
-
+
case USB_CMD_FPGA_TUMBL_DUMP_IMEM:
printf("TUMBL IMEM:\n");
for (i = 0; i < 64; i++)
- {
+ {
for (j = 0; j < 8; j++)
printf("%08X ", (unsigned int) tumbl_imem[i*8 + j]);
-
+
printf("\n");
}
return 0;
-
+
case USB_CMD_FPGA_TUMBL_DUMP_DMEM:
printf("TUMBL DMEM:\n");
for (i = 0; i < 128; i++)
{
for (j = 0; j < 8; j++)
printf("%08X ", (unsigned int) tumbl_dmem[i*8 + j]);
-
+
printf("\n");
}
return 0;
-
+
case USB_CMD_FPGA_RESET:
hal_gpio_direction_output(XC_INIT_PIN, 0);
udev->ep0.user_data = addr;
udev->ep0.ptr = ep0_buffer;
break;
-
+
case USB_VENDOR_TARGET_TUMBL:
udev->ep0.next_pkt_fnc = usb_tumbl_pkt_wr;
udev->ep0.user_data = addr;