CDL Modules
teletext.h
Go to the documentation of this file.
1 /*t t_teletext_vertical_interpolation */
2 typedef enum[2] {
3  tvi_all_scanlines "For twenty scanline output characters",
4  tvi_even_scanlines "Only output scanlines 0, 2, 4, ... 18 - for even interlace fields, or for 10-scanline displays",
5  tvi_odd_scanlines "For twenty scanline output characters, but only outputing scanlines 1, 3, 5, ... 19 - for odd interlace fields",
7 
8 /*t t_teletext_timings */
9 typedef struct {
10  bit restart_frame "Asserted if restarting the frame (resets all teletext character state)";
11  bit end_of_scanline "Asserted if end of scanline";
12  bit first_scanline_of_row "Asserted if first scanline of row; not required if module's internal timing is trusted";
13  bit smoothe "Asserted if interpolation is desired";
14  t_teletext_vertical_interpolation interpolate_vertical "Asserted if vertical interpolation is desired";
16 
17 /*t t_teletext_character */
18 typedef struct {
19  bit valid;
20  bit[7] character;
22 
23 /*t t_teletext_rom_access */
24 typedef struct {
25  bit select;
26  bit[7] address;
28 
29 /*t t_teletext_pixels */
30 typedef struct {
31  bit valid "Asserted to indicate that the red, green and blue are valid; asserted three ticks after a valid character in";
32  bit[12] red;
33  bit[12] green;
34  bit[12] blue;
35  bit last_scanline "Asserted with a pixel to indicate it is on the last scanline of the row";
37 
38 /*a Modules */
39 /*m teletext */
40 extern module teletext( clock clk "Character clock",
41  input bit reset_n,
42  input t_teletext_character character "Parallel character data in, with valid signal",
43  input t_teletext_timings timings "Timings for the scanline, row, etc",
44  output t_teletext_rom_access rom_access "Teletext ROM access",
45  input bit[45] rom_data "Teletext ROM data, valid in cycle after rom_access",
46  output t_teletext_pixels pixels "Output pixels, two clock ticks delayed from clk in"
47  )
48 {
49  timing to rising clock clk character, timings;
50  timing from rising clock clk rom_access;
51  timing to rising clock clk rom_data;
52  timing from rising clock clk pixels;
53 }
Definition: teletext.h:4
bit[12] green
Definition: teletext.h:33
bit[12] red
Definition: teletext.h:32
bit select
Definition: teletext.h:25
bit[7] character
Definition: teletext.h:20
Definition: teletext.h:18
module teletext(clock clk, input bit reset_n, input t_teletext_character character, input t_teletext_timings timings, output t_teletext_rom_access rom_access, input bit[45] rom_data, output t_teletext_pixels pixels)
Definition: teletext.h:40
bit[7] address
Definition: teletext.h:26
bit[12] blue
Definition: teletext.h:34
Definition: teletext.h:24
Definition: teletext.h:9
bit valid
Definition: teletext.h:19
Definition: teletext.h:5
Definition: teletext.h:3
Definition: teletext.h:30
t_teletext_vertical_interpolation
Definition: teletext.h:2