Sorry, but I still don't understand -
A) Do you need to create a correct path? I.e. you need to generate a level which should definitely have a correct path from bottom to top.
or
B) Do you need to generate a random level, and then check if it contains a correct path?
.
If "A", then I would do something like this: