Can every common line code be represented by a FSM?

yes: recall that any algorithmic description is essentially an FSM.

line codes in particular can be represented with very “small” FSMs,

ie, only a few states are required.

Can every common line code be decoded by a trellis decoder?

if it can be described by an FSM then yes (btw, by “trellis decoder” i

assume you mean

the Viterbi algorithm).

In some instances, if you only work with an error-free sequence (and a

linear FSM),

then you don’t even

need the VA (you can always use it if your sequence is noisy!).

In that special case you can decode it with another FSM which implements

the

“inverse” process.

Eg: differential encoding:

y_t = y_{t-1} + x_t

(the state is y_{t-1}, the input is x_t, the output is y_t)

and differential decoding:

x_t = y_t-y_{t-1}

(the state is y_{t-1}, the input is y_t, the output is x_t)

Can anyone give me a pointer for literature?

i don’t know of anything specific to line codes…

What would be the easiest way to implement a

encoderin GNU Radio.

trellis_encoder_XX()

cheers

Achilleas