usb_defs.vh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * usb_defs.vh
  3. *
  4. * vim: ts=4 sw=4 syntax=verilog
  5. *
  6. * Copyright (C) 2019 Sylvain Munaut
  7. * All rights reserved.
  8. *
  9. * LGPL v3+, see LICENSE.lgpl3
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU Lesser General Public
  13. * License as published by the Free Software Foundation; either
  14. * version 3 of the License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  19. * Lesser General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Lesser General Public License
  22. * along with this program; if not, write to the Free Software Foundation,
  23. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  24. */
  25. localparam SYM_SE0 = 2'b00;
  26. localparam SYM_SE1 = 2'b11;
  27. localparam SYM_J = 2'b10;
  28. localparam SYM_K = 2'b01;
  29. localparam PID_OUT = 4'b0001;
  30. localparam PID_IN = 4'b1001;
  31. localparam PID_SOF = 4'b0101;
  32. localparam PID_SETUP = 4'b1101;
  33. localparam PID_DATA0 = 4'b0011;
  34. localparam PID_DATA1 = 4'b1011;
  35. localparam PID_ACK = 4'b0010;
  36. localparam PID_NAK = 4'b1010;
  37. localparam PID_STALL = 4'b1110;
  38. localparam PID_INVAL = 4'b0000;