nios2_uc_lcd_16207.v 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //Legal Notice: (C)2020 Altera Corporation. All rights reserved. Your
  2. //use of Altera Corporation's design tools, logic functions and other
  3. //software and tools, and its AMPP partner logic functions, and any
  4. //output files any of the foregoing (including device programming or
  5. //simulation files), and any associated documentation or information are
  6. //expressly subject to the terms and conditions of the Altera Program
  7. //License Subscription Agreement or other applicable license agreement,
  8. //including, without limitation, that your use is for the sole purpose
  9. //of programming logic devices manufactured by Altera and sold by Altera
  10. //or its authorized distributors. Please refer to the applicable
  11. //agreement for further details.
  12. // synthesis translate_off
  13. `timescale 1ns / 1ps
  14. // synthesis translate_on
  15. // turn off superfluous verilog processor warnings
  16. // altera message_level Level1
  17. // altera message_off 10034 10035 10036 10037 10230 10240 10030
  18. module nios2_uc_lcd_16207 (
  19. // inputs:
  20. address,
  21. begintransfer,
  22. clk,
  23. read,
  24. reset_n,
  25. write,
  26. writedata,
  27. // outputs:
  28. LCD_E,
  29. LCD_RS,
  30. LCD_RW,
  31. LCD_data,
  32. readdata
  33. )
  34. ;
  35. output LCD_E;
  36. output LCD_RS;
  37. output LCD_RW;
  38. inout [ 7: 0] LCD_data;
  39. output [ 7: 0] readdata;
  40. input [ 1: 0] address;
  41. input begintransfer;
  42. input clk;
  43. input read;
  44. input reset_n;
  45. input write;
  46. input [ 7: 0] writedata;
  47. wire LCD_E;
  48. wire LCD_RS;
  49. wire LCD_RW;
  50. wire [ 7: 0] LCD_data;
  51. wire [ 7: 0] readdata;
  52. assign LCD_RW = address[0];
  53. assign LCD_RS = address[1];
  54. assign LCD_E = read | write;
  55. assign LCD_data = (address[0]) ? {8{1'bz}} : writedata;
  56. assign readdata = LCD_data;
  57. //control_slave, which is an e_avalon_slave
  58. endmodule