User`s manual
19 // that are encoded within the stream, in YCrCb format.
20
21 // Make sure that the adv7185 is set to run in 16-bit LLC2 mode.
22
23 module ntsc_decode(clk, reset, tv_in_ycrcb, ycrcb, f, v, h, data_valid);
24
25 // clk - line-locked clock (in this case, LLC1 which runs at 27Mhz)
26 // reset - system reset
27 // tv_in_ycrcb - 10-bit input from chip. should map to pins [19:10]
28 // ycrcb - 24 bit luminance and chrominance (8 bits each)
29 // f - field: 1 indicates an even field, 0 an odd field
30 // v - vertical sync: 1 means vertical sync
31 // h - horizontal sync: 1 means horizontal sync
32
33 input clk;
34 input reset;
35 input [9:0] tv_in_ycrcb; // modified for 10 bit input - should be P[19:10]
36 output [29:0] ycrcb;
37 output f;
38 output v;
39 output h;
40 output data_valid;
41 // output [4:0] state;
42
43 parameter SYNC_1 = 0;
44 parameter SYNC_2 = 1;
45 parameter SYNC_3 = 2;
46 parameter SAV_f1_cb0 = 3;
47 parameter SAV_f1_y0 = 4;
48 parameter SAV_f1_cr1 = 5;
49 parameter SAV_f1_y1 = 6;
50 parameter EAV_f1 = 7;
51 parameter SAV_VBI_f1 = 8;
52 parameter EAV_VBI_f1 = 9;
53 parameter SAV_f2_cb0 = 10;
54 parameter SAV_f2_y0 = 11;
55 parameter SAV_f2_cr1 = 12;
56 parameter SAV_f2_y1 = 13;
57 parameter EAV_f2 = 14;
58 parameter SAV_VBI_f2 = 15;
59 parameter EAV_VBI_f2 = 16;
60
61
62
63
64 // In the start state, the module doesn’t know where
44