[FPGA开发] 【Altera SoC体验之旅】多串口服务器之串口模块设计(1)

chenzhufly   2015-6-1 00:50 楼主
作者:chenzhufly QQ:36886052
1、 硬件环境
硬件平台:Embest SoC --LarkBoard
软件平台:开发板-linux-3.10.31
Quartus 14.0
2、代码结构
我不生产代码,我只是代码的搬运工,代码来源于网络,分享与网络但还是需要做一些修改才能使用,慢慢来吧,结构还是不错的,我们一起学习学习。
主要有三个文件uart_top.v,uart_xmit. v,uart_rcv. v,结构如下:
uart.png
1)uart_top.v是串口逻辑模块的顶层文件,负责管理串口的发送和接收
2)uart_xmit. v为串口的发送模块
3)uart_rcv. v位串口的接收模块
3、代码分析
1)uart_top.v
可以清楚的看到在,在接收模块和发送模块的前端都加了fifo模块,深度为256个字节。
  1. `timescale 1 ns / 10 ps
  2. `define BAUD_DIV 6875
  3. module uart_top
  4. (
  5. // Global signal definition
  6. input rst ,
  7. input sys_clk ,
  8. input pci_clk ,
  9. input pci_wren ,
  10. input [7:0] pci_wrdat ,
  11. input pci_rden ,
  12. output [7:0] pci_rddat ,
  13. // Local bus register
  14. input SEND_CMD ,
  15. input RCV_EN ,
  16. output RCV_IRQ ,
  17. input PARITY_BIT_EN ,
  18. input PARITY_SEL ,
  19. output PARITY_ERROR ,
  20. //output uart_ok ,
  21. output xmit_busy ,
  22. output xmit_ok ,
  23. output xmit_fifo_empty ,
  24. output rcv_fifo_empty ,
  25. // Uart interface
  26. input rxd ,
  27. output txd
  28. );
  29. wire xmit_fifo_rden;
  30. wire [7:0] xmit_fifo_rddat;
  31. wire rcv_fifo_wren;
  32. wire [7:0] rcv_fifo_wrdat;
  33. //wire rcv_fifo_empty;
  34. /*---------------------------------------------------------------------
  35. -- transmit module instantiation
  36. ----------------------------------------------------------------------*/
  37. T_FIFO_256x8 xmit_fifo_256x8
  38. (
  39. .din (pci_wrdat ),
  40. .rd_clk (sys_clk ),
  41. .rd_en (xmit_fifo_rden ),
  42. .rst (1'b0 ),
  43. .wr_clk (pci_clk ),
  44. .wr_en (pci_wren ),
  45. .almost_empty ( ),
  46. .almost_full ( ),
  47. .dout (xmit_fifo_rddat),
  48. .empty (xmit_fifo_empty),
  49. .full ( )
  50. );
  51. uart_xmit uart_xmit_inst
  52. (
  53. .sys_clk (sys_clk ),
  54. .rst (rst ),
  55. // PCI command interface
  56. .SEND_CMD (SEND_CMD ),
  57. .PARITY_BIT_EN (PARITY_BIT_EN ), // parity bit enable or not, 1 = enable, 0 = disable;
  58. .PARITY_SEL (PARITY_SEL ), // determine ODD/EVEN parity, 1 = ODD, 1 = EVEN;
  59. // UART command data fifofer interface
  60. .fifo_rden (xmit_fifo_rden ),
  61. .fifo_rddat (xmit_fifo_rddat),
  62. .fifo_empty (xmit_fifo_empty),
  63. // UART status interface
  64. .uart_busy (xmit_busy ),
  65. .uart_ok (xmit_ok ),
  66. // UART interface
  67. .txd (txd )
  68. );
  69. /*---------------------------------------------------------------------
  70. -- receive module instantiation
  71. ----------------------------------------------------------------------*/
  72. T_FIFO_256x8 rcv_fifo_256x8
  73. (
  74. .din (rcv_fifo_wrdat ),
  75. .rd_clk (sys_clk ),
  76. .rd_en (pci_rden ),
  77. .rst (1'b0 ),
  78. .wr_clk (sys_clk ),
  79. .wr_en (rcv_fifo_wren ),
  80. .almost_empty ( ),
  81. .almost_full ( ),
  82. .dout (pci_rddat ),
  83. .empty (rcv_fifo_empty ),
  84. .full ( )
  85. );
  86. uart_rcv uart_rcv_inst
  87. (
  88. .sys_clk (sys_clk ),
  89. .rst (rst ),
  90. // PCI command interface
  91. .RCV_EN (RCV_EN ),
  92. .RCV_IRQ (RCV_IRQ ),
  93. .PARITY_BIT_EN (PARITY_BIT_EN ), // parity bit enable or not, 1 = enable, 0 = disable;
  94. .PARITY_SEL (PARITY_SEL ), // determine ODD/EVEN parity, 1 = ODD, 1 = EVEN;
  95. .PARITY_ERROR (PARITY_ERROR ),
  96. // UART command data fifofer interface
  97. .fifo_wren (rcv_fifo_wren ),
  98. .fifo_wrdat (rcv_fifo_wrdat ),
  99. .fifo_empty (rcv_fifo_empty ),
  100. // UART interface, which should be registered before internal access
  101. .rxd (rxd )
  102. );
  103. endmodule
2)
uart_xmit. v
串口发送协议的解析和处理
  1. `timescale 1 ns / 10 ps
  2. `define BAUD_DIV 6875
  3. module uart_xmit
  4. (
  5. input sys_clk ,
  6. input rst ,
  7. // PCI command interface
  8. input SEND_CMD ,
  9. input PARITY_BIT_EN , // parity bit enable or not, 1 = enable, 0 = disable;
  10. input PARITY_SEL , // determine ODD/EVEN parity, 1 = ODD, 1 = EVEN;
  11. // UART command data fifofer interface
  12. output reg fifo_rden ,
  13. input [7:0] fifo_rddat ,
  14. input fifo_empty ,
  15. // UART status interface
  16. output reg uart_busy ,
  17. output reg uart_ok ,
  18. // UART interface
  19. output reg txd
  20. );
  21. parameter frame_idle = 3'b000, frame_putchar = 3'b001, frame_bit_call = 3'b010, frame_done = 3'b011;
  22. parameter bit_idle = 3'b000, bit_start = 3'b001, bit_xmit = 3'b010, bit_parity = 3'b011, bit_stop = 3'b100;
  23. reg [2:0] cur_frame;
  24. reg [2:0] next_frame;
  25. reg [2:0] cur_bit;
  26. reg [2:0] next_bit;
  27. reg [7:0] xmit_char;
  28. reg xmit_start;
  29. reg xmit_done;
  30. reg [3:0] bit_cnt;
  31. reg bit_over;
  32. reg [15:0] baud_cnt;
  33. reg shift_en;
  34. /*---------------------------------------------------------------------
  35. -- uart byte frame state control state machine
  36. ----------------------------------------------------------------------*/
  37. always [url=home.php?mod=space&uid=496176]@[/url] ( * )
  38. begin
  39. case ( cur_frame )
  40. frame_idle:
  41. if ( SEND_CMD == 1'b1 ) // put frame char when pci send command event detected
  42. //if ( fifo_empty == 1'b0 )
  43. next_frame <= frame_putchar;
  44. else
  45. next_frame <= frame_idle;
  46. frame_putchar:
  47. //if ( char_over == 1'b1 )
  48. if ( fifo_empty == 1'b1 )
  49. next_frame <= frame_done;
  50. else
  51. next_frame <= frame_bit_call;
  52. frame_bit_call:
  53. if ( xmit_done == 1'b0 )
  54. next_frame <= frame_bit_call;
  55. else if ( fifo_empty == 1'b1 )
  56. next_frame <= frame_idle;
  57. else
  58. next_frame <= frame_putchar;
  59. //if ( xmit_done == 1'b1 )
  60. // next_frame <= frame_putchar;
  61. //else
  62. // next_frame <= frame_bit_call;
  63. frame_done:
  64. next_frame <= frame_idle;
  65. default:
  66. next_frame <= frame_idle;
  67. endcase
  68. end
  69. always @ ( negedge rst or posedge sys_clk )
  70. begin
  71. if ( rst == 1'b0 )
  72. cur_frame <= frame_idle;
  73. else
  74. cur_frame <= next_frame;
  75. end
  76. always @ ( negedge rst or posedge sys_clk )
  77. begin
  78. if ( rst == 1'b0 )
  79. xmit_start <= 1'b0;
  80. else
  81. if ( cur_frame == frame_putchar )
  82. xmit_start <= 1'b1;
  83. else
  84. xmit_start <= 1'b0;
  85. end
  86. /*---------------------------------------------------------------------
  87. -- uart byte frame state control state machine
  88. ----------------------------------------------------------------------*/
  89. always @ ( * )
  90. begin
  91. case ( cur_bit )
  92. bit_idle:
  93. if ( xmit_start == 1'b1 )
  94. next_bit <= bit_start;
  95. else
  96. next_bit <= bit_idle;
  97. bit_start:
  98. if ( shift_en == 1'b1 )
  99. next_bit <= bit_xmit;
  100. else
  101. next_bit <= bit_start;
  102. bit_xmit:
  103. if ( bit_over == 1'b0 )
  104. next_bit <= bit_xmit;
  105. else if ( PARITY_BIT_EN == 1'b1 )
  106. next_bit <= bit_parity;
  107. else
  108. next_bit <= bit_stop;
  109. bit_parity:
  110. if ( shift_en == 1'b0 )
  111. next_bit <= bit_parity;
  112. else
  113. next_bit <= bit_stop;
  114. bit_stop:
  115. if ( shift_en == 1'b1 )
  116. next_bit <= bit_idle;
  117. else
  118. next_bit <= bit_stop;
  119. default:
  120. next_bit <= bit_idle;
  121. endcase
  122. end
  123. always @ ( negedge rst or posedge sys_clk )
  124. begin
  125. if ( rst == 1'b0 )
  126. cur_bit <= bit_idle;
  127. else
  128. cur_bit <= next_bit;
  129. end
  130. always @ ( negedge rst or posedge sys_clk )
  131. begin
  132. if ( rst == 1'b0 )
  133. xmit_done <= 1'b0;
  134. else
  135. if ( cur_bit == bit_stop && shift_en == 1'b1 )
  136. xmit_done <= 1'b1;
  137. else
  138. xmit_done <= 1'b0;
  139. end
  140. /*---------------------------------------------------------------------
  141. -- bit counter control
  142. ----------------------------------------------------------------------*/
  143. always @ ( negedge rst or posedge sys_clk )
  144. begin
  145. if ( rst == 1'b0 )
  146. bit_cnt <= 4'h0;
  147. else
  148. if ( cur_bit == bit_idle )
  149. bit_cnt <= 4'h0;
  150. else if ( shift_en == 1'b1 )
  151. bit_cnt <= bit_cnt + 1'b1;
  152. end
  153. always @ ( negedge rst or posedge sys_clk )
  154. begin
  155. if ( rst == 1'b0 )
  156. bit_over <= 1'b0;
  157. else
  158. if ( cur_bit == bit_idle )
  159. bit_over <= 1'b0;
  160. else if ( bit_cnt == 4'h9 )
  161. bit_over <= 1'b1;
  162. end
  163. /*---------------------------------------------------------------------
  164. -- baud rate control
  165. ----------------------------------------------------------------------*/
  166. always @ ( negedge rst or posedge sys_clk )
  167. begin
  168. if ( rst == 1'b0 )
  169. baud_cnt <= 16'b0_0000_0000;
  170. else
  171. if ( cur_bit == bit_idle || baud_cnt == `BAUD_DIV )
  172. baud_cnt <= 16'b0_0000_0000;
  173. else
  174. baud_cnt <= baud_cnt + 1'b1;
  175. end
  176. always @ ( negedge rst or posedge sys_clk )
  177. begin
  178. if ( rst == 1'b0 )
  179. shift_en <= 1'b0;
  180. else
  181. if ( baud_cnt == `BAUD_DIV )
  182. shift_en <= 1'b1;
  183. else
  184. shift_en <= 1'b0;
  185. end
  186. /*---------------------------------------------------------------------
  187. -- UART fifo interface
  188. ----------------------------------------------------------------------*/
  189. always @ ( negedge rst or posedge sys_clk )
  190. begin
  191. if ( rst == 1'b0 )
  192. fifo_rden <= 1'b0;
  193. else
  194. fifo_rden <= xmit_start;
  195. end
  196. /*---------------------------------------------------------------------
  197. -- TXD controll logic
  198. ----------------------------------------------------------------------*/
  199. always @ ( negedge rst or posedge sys_clk )
  200. begin
  201. if ( rst == 1'b0 )
  202. xmit_char <= 8'h00;
  203. else
  204. if ( cur_bit == bit_start )
  205. xmit_char <= fifo_rddat;
  206. else if ( cur_bit == bit_xmit && shift_en == 1'b1 )
  207. // xmit_char <= { xmit_char[6:0], xmit_char[7] };
  208. xmit_char <= { xmit_char[0], xmit_char[7:1] };
  209. end
  210. always @ ( negedge rst or posedge sys_clk )
  211. begin
  212. if ( rst == 1'b0 )
  213. txd <= 1'b1;
  214. else if ( shift_en == 1'b1 )
  215. case ( cur_bit )
  216. bit_start :
  217. txd <= 1'b0;
  218. bit_xmit:
  219. // txd <= xmit_char[7];
  220. txd <= xmit_char[0];
  221. bit_parity:
  222. txd <= ( xmit_char[7] ^ xmit_char[6] ^ xmit_char[5] ^ xmit_char[4] ^
  223. xmit_char[3] ^ xmit_char[2] ^ xmit_char[1] ^ xmit_char[0] ) ^ (~PARITY_SEL);
  224. default:
  225. txd <= 1'b1;
  226. endcase
  227. end
  228. always @ ( negedge rst or posedge sys_clk )
  229. begin
  230. if ( rst == 1'b0 )
  231. uart_ok <= 1'b0;
  232. else
  233. if ( SEND_CMD == 1'b1 )
  234. uart_ok <= 1'b0;
  235. else if ( fifo_empty == 1'b1 && xmit_done == 1'b1 )
  236. uart_ok <= 1'b1;
  237. end
  238. always @ ( negedge rst or posedge sys_clk )
  239. begin
  240. if ( rst == 1'b0 )
  241. uart_busy <= 1'b0;
  242. else
  243. if ( cur_frame == frame_idle )
  244. uart_busy <= 1'b0;
  245. else if ( fifo_empty == 1'b0 )
  246. uart_busy <= 1'b1;
  247. end
  248. endmodule
3)
uart_rcv. v
串口接收协议的解析和处理
  1. `timescale 1 ns / 10 ps
  2. `define BAUD_DIV 6875
  3. module uart_rcv
  4. (
  5. input sys_clk ,
  6. input rst ,
  7. // PCI command interface
  8. input RCV_EN ,
  9. output RCV_IRQ ,
  10. input PARITY_BIT_EN , // parity bit enable or not, 1 = enable, 0 = disable;
  11. input PARITY_SEL , // determine ODD/EVEN parity, 1 = ODD, 1 = EVEN;
  12. output reg PARITY_ERROR ,
  13. // UART command data fifofer interface
  14. output reg fifo_wren ,
  15. output reg [7:0] fifo_wrdat ,
  16. input fifo_empty ,
  17. // UART interface, which should be registered before internal access
  18. input rxd
  19. );
  20. reg rxd_reg;
  21. reg rxd_reg_sft;
  22. reg [7:0] rxd_s0_cnt;
  23. reg [7:0] rxd_s1_cnt;
  24. reg rxd_anti_glitch;
  25. reg [2:0] cur_bit;
  26. reg [2:0] next_bit;
  27. reg [7:0] rcv_char;
  28. reg start_event;
  29. reg start_event_dly;
  30. reg [3:0] bit_cnt;
  31. reg bit_over;
  32. reg [15:0] baud_cnt;
  33. reg shift_en;
  34. reg sample_en;
  35. parameter bit_idle = 3'b000, bit_start = 3'b001, bit_rcv = 3'b010, bit_parity = 3'b011, bit_stop = 3'b100;
  36. /*---------------------------------------------------------------------
  37. -- rxd anti-glitch control
  38. ----------------------------------------------------------------------*/
  39. always @ ( negedge rst or posedge sys_clk )
  40. begin
  41. if ( rst == 1'b0 )
  42. rxd_s0_cnt <= 0;
  43. else
  44. if ( rxd == 1'b1 )
  45. rxd_s0_cnt <= 0;
  46. else if ( rxd_s0_cnt[4] == 1'b0 )
  47. rxd_s0_cnt <= rxd_s0_cnt + 1'b1;
  48. end
  49. always @ ( negedge rst or posedge sys_clk )
  50. begin
  51. if ( rst == 1'b0 )
  52. rxd_s1_cnt <= 0;
  53. else
  54. if ( rxd == 1'b0 )
  55. rxd_s1_cnt <= 0;
  56. else if ( rxd_s1_cnt[4] == 1'b0 )
  57. rxd_s1_cnt <= rxd_s1_cnt + 1'b1;
  58. end
  59. always @ ( negedge rst or posedge sys_clk )
  60. begin
  61. if ( rst == 1'b0 )
  62. rxd_anti_glitch <= 1'b1;
  63. else
  64. if ( rxd_s0_cnt[4] == 1'b1 )
  65. rxd_anti_glitch <= 1'b0;
  66. else if ( rxd_s1_cnt[4] == 1'b1 )
  67. rxd_anti_glitch <= 1'b1;
  68. end
  69. /*---------------------------------------------------------------------
  70. -- start bit detection
  71. ----------------------------------------------------------------------*/
  72. always @ ( negedge rst or posedge sys_clk )
  73. begin
  74. if ( rst == 1'b0 )
  75. begin
  76. rxd_reg <= 1'b1;
  77. rxd_reg_sft <= 1'b1;
  78. end
  79. else
  80. begin
  81. rxd_reg <= rxd_anti_glitch;
  82. rxd_reg_sft <= rxd_reg;
  83. end
  84. end
  85. always @ ( negedge rst or posedge sys_clk )
  86. begin
  87. if ( rst == 1'b0 )
  88. start_event <= 1'b0;
  89. else
  90. if ( rxd_reg == 1'b0 && rxd_reg_sft == 1'b1 &&
  91. ( cur_bit == bit_idle || cur_bit == bit_stop ) )
  92. start_event <= 1'b1;
  93. else
  94. start_event <= 1'b0;
  95. end
  96. always @ ( negedge rst or posedge sys_clk )
  97. begin
  98. if ( rst == 1'b0 )
  99. start_event_dly <= 1'b0;
  100. else
  101. start_event_dly <= start_event;
  102. end
  103. /*---------------------------------------------------------------------
  104. -- uart byte frame state control state machine
  105. ----------------------------------------------------------------------*/
  106. always @ ( * )
  107. begin
  108. case ( cur_bit )
  109. bit_idle:
  110. if ( start_event == 1'b1 )
  111. next_bit <= bit_start;
  112. else
  113. next_bit <= bit_idle;
  114. bit_start:
  115. if ( shift_en == 1'b1 )
  116. next_bit <= bit_rcv;
  117. else
  118. next_bit <= bit_start;
  119. bit_rcv:
  120. if ( bit_over == 1'b0 )
  121. next_bit <= bit_rcv;
  122. else if ( PARITY_BIT_EN == 1'b1 )
  123. next_bit <= bit_parity;
  124. else
  125. next_bit <= bit_stop;
  126. bit_parity:
  127. if ( shift_en == 1'b0 )
  128. next_bit <= bit_parity;
  129. else
  130. next_bit <= bit_stop;
  131. bit_stop:
  132. //if ( shift_en == 1'b1 )
  133. // next_bit <= bit_idle;
  134. //else
  135. // next_bit <= bit_stop;
  136. if ( start_event == 1'b1 ) // Caution!!! start_event will occur in bit_stop phase
  137. next_bit <= bit_start;
  138. else if ( shift_en == 1'b1 )
  139. next_bit <= bit_idle;
  140. else
  141. next_bit <= bit_stop;
  142. default:
  143. next_bit <= bit_idle;
  144. endcase
  145. end
  146. always @ ( negedge rst or posedge sys_clk )
  147. begin
  148. if ( rst == 1'b0 )
  149. cur_bit <= bit_idle;
  150. else
  151. cur_bit <= next_bit;
  152. end
  153. /*---------------------------------------------------------------------
  154. -- bit counter control
  155. ----------------------------------------------------------------------*/
  156. always @ ( negedge rst or posedge sys_clk )
  157. begin
  158. if ( rst == 1'b0 )
  159. bit_cnt <= 4'h0;
  160. else
  161. if ( cur_bit == bit_idle || ( cur_bit == bit_stop && start_event == 1'b1 ) )
  162. bit_cnt <= 4'h0;
  163. //else if ( shift_en == 1'b1 )
  164. else if ( shift_en == 1'b1 && start_event_dly == 1'b0 ) // modified by andrew, 2007-5-24 11:46
  165. bit_cnt <= bit_cnt + 1'b1;
  166. end
  167. always @ ( negedge rst or posedge sys_clk )
  168. begin
  169. if ( rst == 1'b0 )
  170. bit_over <= 1'b0;
  171. else
  172. if ( cur_bit == bit_idle || ( cur_bit == bit_stop && start_event == 1'b1 ) )
  173. bit_over <= 1'b0;
  174. else if ( bit_cnt == 4'h9 )
  175. bit_over <= 1'b1;
  176. end
  177. /*---------------------------------------------------------------------
  178. -- baud rate control
  179. ----------------------------------------------------------------------*/
  180. always @ ( negedge rst or posedge sys_clk )
  181. begin
  182. if ( rst == 1'b0 )
  183. baud_cnt <= 9'b0_0000_0000;
  184. else
  185. //if ( cur_bit == bit_idle || baud_cnt == `BAUD_DIV )
  186. if ( cur_bit == bit_idle ||
  187. ( cur_bit == bit_stop && start_event == 1'b1 ) ||
  188. baud_cnt == `BAUD_DIV ) // to avoid error to be accumulated!!!!!
  189. baud_cnt <= 9'b0_0000_0000;
  190. else
  191. baud_cnt <= baud_cnt + 1'b1;
  192. end
  193. always @ ( negedge rst or posedge sys_clk )
  194. begin
  195. if ( rst == 1'b0 )
  196. shift_en <= 1'b0;
  197. else
  198. if ( baud_cnt == `BAUD_DIV )
  199. shift_en <= 1'b1;
  200. else
  201. shift_en <= 1'b0;
  202. end
  203. always @ ( negedge rst or posedge sys_clk )
  204. begin
  205. if ( rst == 1'b0 )
  206. sample_en <= 1'b0;
  207. else
  208. if ( baud_cnt == (`BAUD_DIV >> 1) )
  209. sample_en <= 1'b1;
  210. else
  211. sample_en <= 1'b0;
  212. end
  213. /*---------------------------------------------------------------------
  214. -- Character received from uart interface
  215. ----------------------------------------------------------------------*/
  216. always @ ( negedge rst or posedge sys_clk )
  217. begin
  218. if ( rst == 1'b0 )
  219. rcv_char <= 8'h00;
  220. else
  221. if ( cur_bit == bit_rcv && sample_en == 1'b1 )
  222. //rcv_char <= { rcv_char[6:0], rxd_reg };
  223. rcv_char <= { rxd_reg, rcv_char[7:1] };
  224. end
  225. /*
  226. always @ ( negedge rst or posedge sys_clk )
  227. begin
  228. if ( rst == 1'b0 )
  229. PARITY_ERROR <= 1'b0;
  230. else
  231. if ( cur_bit == bit_parity && shift_en == 1'b1 )
  232. PARITY_ERROR <= ( rxd_reg == ( getchar[7] ^ getchar[6] ^ getchar[5] ^ getchar[4] ^
  233. getchar[3] ^ getchar[2] ^ getchar[1] ^ getchar[0] ) ^ (~PARITY_SEL)
  234. ) ? 1'b0 : 1'b1;
  235. end
  236. */
  237. /*---------------------------------------------------------------------
  238. -- FIFO control logic
  239. ----------------------------------------------------------------------*/
  240. always @ ( negedge rst or posedge sys_clk )
  241. begin
  242. if ( rst == 1'b0 )
  243. fifo_wren <= 1'b0;
  244. else
  245. if ( cur_bit == bit_stop && ( shift_en == 1'b1 || start_event == 1'b1 ) )
  246. fifo_wren <= 1'b1;
  247. else
  248. fifo_wren <= 1'b0;
  249. end
  250. always @ ( negedge rst or posedge sys_clk )
  251. begin
  252. if ( rst == 1'b0 )
  253. fifo_wrdat <= 0;
  254. else
  255. fifo_wrdat <= rcv_char;
  256. end
  257. assign RCV_IRQ = ~fifo_empty;
  258. endmodule
4、小结
1)这里主要展示了一下串口模块的逻辑和结构,不过还需要进一步的仿真和测试;
2)中断处理部分还没加进来。
本帖最后由 chenzhufly 于 2015-6-1 00:51 编辑
生活就是油盐酱醋再加一点糖,快活就是一天到晚乐呵呵的忙 =================================== 做一个简单的人,踏实而务实,不沉溺幻想,不庸人自扰

回复评论 (3)

从头到尾看了一遍,虽然不明白,但是不明觉厉
>>EE大学堂,精彩视频汇聚的地方
点赞  2015-6-1 01:02
支持
http://www.tdhj.cn
点赞  2015-6-1 10:52
可以把 每个模块生成一个图形   顶层直接用图像形式显示方便理解
点赞  2015-6-3 20:30
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复